diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-06-10 21:33:51 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-07-14 14:34:02 +0200 |
commit | facc3530fb5c89a40bc83045422add392b8db4a1 (patch) | |
tree | 93279f6ca92c75b6dd09fcf21286640486ec4730 /fs/nfs/dir.c | |
parent | switch nfs_lookup_check_intent() away from nameidata (diff) | |
download | linux-facc3530fb5c89a40bc83045422add392b8db4a1.tar.xz linux-facc3530fb5c89a40bc83045422add392b8db4a1.zip |
nfs_lookup_verify_inode() - nd is *always* non-NULL here
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r-- | fs/nfs/dir.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 48485f1f0bda..ad5aef4995aa 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -1069,19 +1069,16 @@ int nfs_lookup_verify_inode(struct inode *inode, struct nameidata *nd) if (IS_AUTOMOUNT(inode)) return 0; - if (nd != NULL) { - /* VFS wants an on-the-wire revalidation */ - if (nd->flags & LOOKUP_REVAL) - goto out_force; - /* This is an open(2) */ - if (nfs_lookup_check_intent(nd->flags, LOOKUP_OPEN) != 0 && - !(server->flags & NFS_MOUNT_NOCTO) && - (S_ISREG(inode->i_mode) || - S_ISDIR(inode->i_mode))) - goto out_force; - return 0; - } - return nfs_revalidate_inode(server, inode); + /* VFS wants an on-the-wire revalidation */ + if (nd->flags & LOOKUP_REVAL) + goto out_force; + /* This is an open(2) */ + if (nfs_lookup_check_intent(nd->flags, LOOKUP_OPEN) != 0 && + !(server->flags & NFS_MOUNT_NOCTO) && + (S_ISREG(inode->i_mode) || + S_ISDIR(inode->i_mode))) + goto out_force; + return 0; out_force: return __nfs_revalidate_inode(server, inode); } |