aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-06-10 15:33:51 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-07-14 08:34:02 -0400
commitfacc3530fb5c89a40bc83045422add392b8db4a1 (patch)
tree93279f6ca92c75b6dd09fcf21286640486ec4730 /fs
parent93420b40bb19433c3bc01c37c6c908ae7ce13228 (diff)
nfs_lookup_verify_inode() - nd is *always* non-NULL here
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/dir.c23
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)
1069 1069
1070 if (IS_AUTOMOUNT(inode)) 1070 if (IS_AUTOMOUNT(inode))
1071 return 0; 1071 return 0;
1072 if (nd != NULL) { 1072 /* VFS wants an on-the-wire revalidation */
1073 /* VFS wants an on-the-wire revalidation */ 1073 if (nd->flags & LOOKUP_REVAL)
1074 if (nd->flags & LOOKUP_REVAL) 1074 goto out_force;
1075 goto out_force; 1075 /* This is an open(2) */
1076 /* This is an open(2) */ 1076 if (nfs_lookup_check_intent(nd->flags, LOOKUP_OPEN) != 0 &&
1077 if (nfs_lookup_check_intent(nd->flags, LOOKUP_OPEN) != 0 && 1077 !(server->flags & NFS_MOUNT_NOCTO) &&
1078 !(server->flags & NFS_MOUNT_NOCTO) && 1078 (S_ISREG(inode->i_mode) ||
1079 (S_ISREG(inode->i_mode) || 1079 S_ISDIR(inode->i_mode)))
1080 S_ISDIR(inode->i_mode))) 1080 goto out_force;
1081 goto out_force; 1081 return 0;
1082 return 0;
1083 }
1084 return nfs_revalidate_inode(server, inode);
1085out_force: 1082out_force:
1086 return __nfs_revalidate_inode(server, inode); 1083 return __nfs_revalidate_inode(server, inode);
1087} 1084}