]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
NFS: Fix case insensitive renames
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 27 Jun 2022 20:04:02 +0000 (16:04 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Sun, 10 Jul 2022 23:00:53 +0000 (19:00 -0400)
commit6ca0a6f834ed06b2b4c6d1f7f162f2b0d3e196cf
tree7805bc0b232dbe3a0c9d0eb233fa2bb5e83b5f8a
parent431794e67e238e6fd170499a14fd2abf0a16b5bd
NFS: Fix case insensitive renames

For filesystems that are case insensitive and case preserving, we need
to be able to rename from one case folded variant of the filename to
another.
Currently, if we have looked up the target filename before the call to
rename, then we may have a hashed dentry with that target name in the
dcache, causing the vfs to optimise away the rename.
To avoid that, let's drop the target dentry, and leave it to the server
to optimise away the rename if that is the correct thing to do.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/dir.c