fs: Drop pointless 'source' check from vfs_rename()
Jan Kara
reviewerPATCH 1/1 fs: Drop pointless 'source' check from vfs_rename()
The check for 'source' being non-NULL before unlocking it is pointless as 'source' is guaranteed to exist in vfs_rename(). Drop it.
Reported-by kernel test robot <[email protected]>
Reported-by Dan Carpenter <[email protected]>
Signed-off-by Jan Kara <[email protected]>
--- fs/namei.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
fs/namei.c +1 -2
@@ -4874,8 +4874,7 @@ int vfs_rename(struct renamedata *rd)d_exchange (old_dentry, new_dentry); } out: -if (source) -inode_unlock (source); +inode_unlock (source);if (target)inode_unlock (target);dput (new_dentry);
Signature · 1 line
2.35.3