diff options
| author | Paulo Alcantara <pc@manguebit.org> | 2025-10-22 21:11:01 -0300 |
|---|---|---|
| committer | Steve French <stfrench@microsoft.com> | 2025-10-23 02:46:50 -0500 |
| commit | 72ed55b4c335703c203b942972558173e1e5ddee (patch) | |
| tree | 8c1563324782426297f96e0d49d5d5fe6f41b523 | |
| parent | 5b2ff4873aeab972f919d5aea11c51393322bf58 (diff) | |
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>
| -rw-r--r-- | fs/smb/client/inode.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/smb/client/inode.c b/fs/smb/client/inode.c index 098a79b7a959..cac355364e43 100644 --- a/fs/smb/client/inode.c +++ b/fs/smb/client/inode.c @@ -2484,11 +2484,8 @@ cifs_do_rename(const unsigned int xid, struct dentry *from_dentry, } #endif /* CONFIG_CIFS_ALLOW_INSECURE_LEGACY */ do_rename_exit: - if (rc == 0) { + if (rc == 0) d_move(from_dentry, to_dentry); - /* Force a new lookup */ - d_drop(from_dentry); - } cifs_put_tlink(tlink); return rc; } |
