Commit 93420b40bb19433c3bc01c37c6c908ae7ce13228

Authored by Al Viro
1 parent 02e5180d99

switch nfs_lookup_check_intent() away from nameidata

just pass the flags

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Showing 1 changed file with 5 additions and 5 deletions Side-by-side Diff

... ... @@ -1037,10 +1037,10 @@
1037 1037 * component of the path and none of them is set before that last
1038 1038 * component.
1039 1039 */
1040   -static inline unsigned int nfs_lookup_check_intent(struct nameidata *nd,
  1040 +static inline unsigned int nfs_lookup_check_intent(unsigned int flags,
1041 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 @@
1051 1051 {
1052 1052 if (NFS_PROTO(dir)->version == 2)
1053 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 @@
1074 1074 if (nd->flags & LOOKUP_REVAL)
1075 1075 goto out_force;
1076 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 1078 !(server->flags & NFS_MOUNT_NOCTO) &&
1079 1079 (S_ISREG(inode->i_mode) ||
1080 1080 S_ISDIR(inode->i_mode)))
... ... @@ -1098,7 +1098,7 @@
1098 1098 struct nameidata *nd)
1099 1099 {
1100 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 1102 return 0;
1103 1103 if (NFS_SERVER(dir)->flags & NFS_MOUNT_LOOKUP_CACHE_NONEG)
1104 1104 return 1;