aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/dir.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-06-10 15:18:15 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-07-14 08:33:57 -0400
commit93420b40bb19433c3bc01c37c6c908ae7ce13228 (patch)
tree8192cd8f8b19803648aab1cf09175fa628b48fdf /fs/nfs/dir.c
parent02e5180d991f203441687cecd0b7e6a2ba0a34d3 (diff)
switch nfs_lookup_check_intent() away from nameidata
just pass the flags Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r--fs/nfs/dir.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index f167c7a1d67b..48485f1f0bda 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1037,10 +1037,10 @@ static int nfs_check_verifier(struct inode *dir, struct dentry *dentry)
1037 * component of the path and none of them is set before that last 1037 * component of the path and none of them is set before that last
1038 * component. 1038 * component.
1039 */ 1039 */
1040static inline unsigned int nfs_lookup_check_intent(struct nameidata *nd, 1040static inline unsigned int nfs_lookup_check_intent(unsigned int flags,
1041 unsigned int mask) 1041 unsigned int mask)
1042{ 1042{
1043 return nd->flags & mask; 1043 return flags & mask;
1044} 1044}
1045 1045
1046/* 1046/*
@@ -1051,7 +1051,7 @@ static int nfs_is_exclusive_create(struct inode *dir, struct nameidata *nd)
1051{ 1051{
1052 if (NFS_PROTO(dir)->version == 2) 1052 if (NFS_PROTO(dir)->version == 2)
1053 return 0; 1053 return 0;
1054 return nd && nfs_lookup_check_intent(nd, LOOKUP_EXCL); 1054 return nd && nfs_lookup_check_intent(nd->flags, LOOKUP_EXCL);
1055} 1055}
1056 1056
1057/* 1057/*
@@ -1074,7 +1074,7 @@ int nfs_lookup_verify_inode(struct inode *inode, struct nameidata *nd)
1074 if (nd->flags & LOOKUP_REVAL) 1074 if (nd->flags & LOOKUP_REVAL)
1075 goto out_force; 1075 goto out_force;
1076 /* This is an open(2) */ 1076 /* This is an open(2) */
1077 if (nfs_lookup_check_intent(nd, LOOKUP_OPEN) != 0 && 1077 if (nfs_lookup_check_intent(nd->flags, LOOKUP_OPEN) != 0 &&
1078 !(server->flags & NFS_MOUNT_NOCTO) && 1078 !(server->flags & NFS_MOUNT_NOCTO) &&
1079 (S_ISREG(inode->i_mode) || 1079 (S_ISREG(inode->i_mode) ||
1080 S_ISDIR(inode->i_mode))) 1080 S_ISDIR(inode->i_mode)))
@@ -1098,7 +1098,7 @@ int nfs_neg_need_reval(struct inode *dir, struct dentry *dentry,
1098 struct nameidata *nd) 1098 struct nameidata *nd)
1099{ 1099{
1100 /* Don't revalidate a negative dentry if we're creating a new file */ 1100 /* Don't revalidate a negative dentry if we're creating a new file */
1101 if (nd != NULL && nfs_lookup_check_intent(nd, LOOKUP_CREATE) != 0) 1101 if (nd != NULL && nfs_lookup_check_intent(nd->flags, LOOKUP_CREATE) != 0)
1102 return 0; 1102 return 0;
1103 if (NFS_SERVER(dir)->flags & NFS_MOUNT_LOOKUP_CACHE_NONEG) 1103 if (NFS_SERVER(dir)->flags & NFS_MOUNT_LOOKUP_CACHE_NONEG)
1104 return 1; 1104 return 1;