Commit 72ed55b4 authored by Paulo Alcantara's avatar Paulo Alcantara Committed by Steve French
Browse files

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: default avatarPaulo Alcantara (Red Hat) <pc@manguebit.org>
Reviewed-by: default avatarDavid Howells <dhowells@redhat.com>
Cc: stable@vger.kernel.org
Cc: linux-cifs@vger.kernel.org
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 5b2ff487
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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;
}