Commit 68eaba4c authored by Trond Myklebust's avatar Trond Myklebust Committed by Anna Schumaker

NFS: Fix the verifier for case sensitive filesystem in nfs_atomic_open()

Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent 00bdadc7
...@@ -1888,6 +1888,7 @@ int nfs_atomic_open(struct inode *dir, struct dentry *dentry, ...@@ -1888,6 +1888,7 @@ int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
struct iattr attr = { .ia_valid = ATTR_OPEN }; struct iattr attr = { .ia_valid = ATTR_OPEN };
struct inode *inode; struct inode *inode;
unsigned int lookup_flags = 0; unsigned int lookup_flags = 0;
unsigned long dir_verifier;
bool switched = false; bool switched = false;
int created = 0; int created = 0;
int err; int err;
...@@ -1961,7 +1962,11 @@ int nfs_atomic_open(struct inode *dir, struct dentry *dentry, ...@@ -1961,7 +1962,11 @@ int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
switch (err) { switch (err) {
case -ENOENT: case -ENOENT:
d_splice_alias(NULL, dentry); d_splice_alias(NULL, dentry);
nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); if (nfs_server_capable(dir, NFS_CAP_CASE_INSENSITIVE))
dir_verifier = inode_peek_iversion_raw(dir);
else
dir_verifier = nfs_save_change_attribute(dir);
nfs_set_verifier(dentry, dir_verifier);
break; break;
case -EISDIR: case -EISDIR:
case -ENOTDIR: case -ENOTDIR:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment