lkml.org 
[lkml]   [2022]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] fsnotify: remove redundant parameter judgment
Date
iput() has already judged the incoming parameter, so there is no need to
repeat the judgment here.

Signed-off-by: Bang Li <libang.linuxer@gmail.com>
---
fs/notify/fsnotify.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c
index 494f653efbc6..70a8516b78bc 100644
--- a/fs/notify/fsnotify.c
+++ b/fs/notify/fsnotify.c
@@ -70,8 +70,7 @@ static void fsnotify_unmount_inodes(struct super_block *sb)
spin_unlock(&inode->i_lock);
spin_unlock(&sb->s_inode_list_lock);

- if (iput_inode)
- iput(iput_inode);
+ iput(iput_inode);

/* for each watch, send FS_UNMOUNT and then remove it */
fsnotify_inode(inode, FS_UNMOUNT);
@@ -85,8 +84,7 @@ static void fsnotify_unmount_inodes(struct super_block *sb)
}
spin_unlock(&sb->s_inode_list_lock);

- if (iput_inode)
- iput(iput_inode);
+ iput(iput_inode);
}

void fsnotify_sb_delete(struct super_block *sb)
--
2.25.1
\
 
 \ /
  Last update: 2022-03-11 16:15    [W:0.040 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site