VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   30 Branches   50 Tags
author: Jan Kara <jack@suse.cz> 2023-07-03 16:49:11 +0200 committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2023-07-19 16:36:59 +0200 commit: f5a48c015129eed88a276e09188541ad5f5d766f parent: ac2d66430ea67bbcdb9fe0912ba5a68137cb8808
Commit Summary:
fs: no need to check source
Diffstat:
1 file changed, 1 insertion, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 6a5e26a529e1..7e5cb92feab3 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -4872,8 +4872,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);