Skip to content

Commit 28e1216

Browse files
pcacjrgregkh
authored andcommitted
smb: client: get rid of d_drop() in cifs_do_rename()
commit 72ed55b upstream. 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) <[email protected]> Reviewed-by: David Howells <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Steve French <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 1bbdfd6 commit 28e1216

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
@@ -2484,11 +2484,8 @@ cifs_do_rename(const unsigned int xid, struct dentry *from_dentry,
24842484
}
24852485
#endif /* CONFIG_CIFS_ALLOW_INSECURE_LEGACY */
24862486
do_rename_exit:
2487-
if (rc == 0) {
2487+
if (rc == 0)
24882488
d_move(from_dentry, to_dentry);
2489-
/* Force a new lookup */
2490-
d_drop(from_dentry);
2491-
}
24922489
cifs_put_tlink(tlink);
24932490
return rc;
24942491
}

0 commit comments

Comments
 (0)