Skip to content

Commit 63ef776

Browse files
committed
smb: client: get rid of d_drop() in cifs_do_rename()
JIRA: https://issues.redhat.com/browse/RHEL-124956 commit 72ed55b Author: Paulo Alcantara <pc@manguebit.org> Date: Wed Oct 22 21:11:01 2025 -0300 smb: client: get rid of d_drop() in cifs_do_rename() There is no need to force a lookup by unhashing the moved dentry after successfully renaming the file on server. The file metadata will be re-fetched from server, if necessary, in the next call to ->d_revalidate() anyways. Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.org> Reviewed-by: David Howells <dhowells@redhat.com> Cc: stable@vger.kernel.org Cc: linux-cifs@vger.kernel.org Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Paulo Alcantara <paalcant@redhat.com>
1 parent cf5ba31 commit 63ef776

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

fs/smb/client/inode.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2482,11 +2482,8 @@ cifs_do_rename(const unsigned int xid, struct dentry *from_dentry,
24822482
}
24832483
#endif /* CONFIG_CIFS_ALLOW_INSECURE_LEGACY */
24842484
do_rename_exit:
2485-
if (rc == 0) {
2485+
if (rc == 0)
24862486
d_move(from_dentry, to_dentry);
2487-
/* Force a new lookup */
2488-
d_drop(from_dentry);
2489-
}
24902487
cifs_put_tlink(tlink);
24912488
return rc;
24922489
}

0 commit comments

Comments
 (0)