* component of the path and none of them is set before that last
  * component.
  */
-static inline unsigned int nfs_lookup_check_intent(struct nameidata *nd,
+static inline unsigned int nfs_lookup_check_intent(unsigned int flags,
                                                unsigned int mask)
 {
-       return nd->flags & mask;
+       return flags & mask;
 }
 
 /*
 {
        if (NFS_PROTO(dir)->version == 2)
                return 0;
-       return nd && nfs_lookup_check_intent(nd, LOOKUP_EXCL);
+       return nd && nfs_lookup_check_intent(nd->flags, LOOKUP_EXCL);
 }
 
 /*
                if (nd->flags & LOOKUP_REVAL)
                        goto out_force;
                /* This is an open(2) */
-               if (nfs_lookup_check_intent(nd, LOOKUP_OPEN) != 0 &&
+               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)))
                       struct nameidata *nd)
 {
        /* Don't revalidate a negative dentry if we're creating a new file */
-       if (nd != NULL && nfs_lookup_check_intent(nd, LOOKUP_CREATE) != 0)
+       if (nd != NULL && nfs_lookup_check_intent(nd->flags, LOOKUP_CREATE) != 0)
                return 0;
        if (NFS_SERVER(dir)->flags & NFS_MOUNT_LOOKUP_CACHE_NONEG)
                return 1;