Skip to content

Commit

Permalink
nfs_lookup_verify_inode() - nd is *always* non-NULL here
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Jul 14, 2012
1 parent 93420b4 commit facc353
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions fs/nfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit facc353

Please sign in to comment.