diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-03-06 17:34:50 (GMT) |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-03-07 19:35:37 (GMT) |
commit | c37dcd334c0b0a46a90cfa13b9f69e2aaa89bc09 (patch) | |
tree | 0792bbc64fff676c76a696a76a9f703cd9500145 /fs/nfs/inode.c | |
parent | ee1a2c564f67407947e89f1dac75ac0af0ba88c7 (diff) | |
download | linux-fsl-qoriq-c37dcd334c0b0a46a90cfa13b9f69e2aaa89bc09.tar.xz |
NFS: Fix the fsid revalidation in nfs_update_inode()
When we detect that we've crossed a mountpoint on the remote server, we
must take care not to use that inode to revalidate the fsid on our
current superblock. To do so, we label the inode as a remote mountpoint,
and check for that in nfs_update_inode().
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r-- | fs/nfs/inode.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 966a885..a4c7cf2 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -299,6 +299,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); } } else if (S_ISLNK(inode->i_mode)) inode->i_op = &nfs_symlink_inode_operations; @@ -1003,8 +1004,9 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) server = NFS_SERVER(inode); /* Update the fsid? */ - if (S_ISDIR(inode->i_mode) - && !nfs_fsid_equal(&server->fsid, &fattr->fsid)) + if (S_ISDIR(inode->i_mode) && + !nfs_fsid_equal(&server->fsid, &fattr->fsid) && + !test_bit(NFS_INO_MOUNTPOINT, &nfsi->flags)) server->fsid = fattr->fsid; /* |