NFS: Use d_automount() rather than abusing follow_link()
[firefly-linux-kernel-4.4.55.git] / fs / nfs / inode.c
index ce00b704452c6bc0665422a066376694a82ae119..d8512423ba7298ee56368fd27e42d4d01fd7cee2 100644 (file)
@@ -300,7 +300,7 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr)
                                else
                                        inode->i_op = &nfs_mountpoint_inode_operations;
                                inode->i_fop = NULL;
-                               set_bit(NFS_INO_MOUNTPOINT, &nfsi->flags);
+                               inode->i_flags |= S_AUTOMOUNT;
                        }
                } else if (S_ISLNK(inode->i_mode))
                        inode->i_op = &nfs_symlink_inode_operations;
@@ -1208,7 +1208,7 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
        /* Update the fsid? */
        if (S_ISDIR(inode->i_mode) && (fattr->valid & NFS_ATTR_FATTR_FSID) &&
                        !nfs_fsid_equal(&server->fsid, &fattr->fsid) &&
-                       !test_bit(NFS_INO_MOUNTPOINT, &nfsi->flags))
+                       !IS_AUTOMOUNT(inode))
                server->fsid = fattr->fsid;
 
        /*