diff options
-rw-r--r-- | fs/nfs/dir.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 33cfff8ea551..3fafecdb2070 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -1276,13 +1276,12 @@ static bool nfs_verifier_is_delegated(struct dentry *dentry) static void nfs_set_verifier_locked(struct dentry *dentry, unsigned long verf) { struct inode *inode = d_inode(dentry); + struct inode *dir = d_inode(dentry->d_parent); - if (!nfs_verifier_is_delegated(dentry) && - !nfs_verify_change_attribute(d_inode(dentry->d_parent), verf)) - goto out; + if (!nfs_verify_change_attribute(dir, verf)) + return; if (inode && NFS_PROTO(inode)->have_delegation(inode, FMODE_READ)) nfs_set_verifier_delegated(&verf); -out: dentry->d_time = verf; } |