Message ID | 20220713220649.1038411-1-trondmy@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | NFS: Fix case insensitive renames | expand |
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 0c4e8dd6aa96..d9d277d7fa84 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -1739,6 +1739,10 @@ nfs_do_lookup_revalidate(struct inode *dir, struct dentry *dentry, goto out_bad; } + if ((flags & LOOKUP_RENAME_TARGET) && d_count(dentry) < 2 && + nfs_server_capable(dir, NFS_CAP_CASE_INSENSITIVE)) + goto out_bad; + if (nfs_verifier_is_delegated(dentry)) return nfs_lookup_revalidate_delegated(dir, dentry, inode);