diff options
author | Chris Metcalf <cmetcalf@tilera.com> | 2011-08-03 00:14:02 +0400 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2011-08-03 00:14:02 +0400 |
commit | 3d071cd313643cf82b1ce1ce4fdf08d63ad53964 (patch) | |
tree | 874c1683f32f07614aa123f6ca5cf6c2bd443704 /fs/nfs/internal.h | |
parent | cf8e98d15361f8c594da00a3f7a500787fc1a426 (diff) | |
parent | 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe (diff) | |
download | linux-3d071cd313643cf82b1ce1ce4fdf08d63ad53964.tar.xz |
Merge tag 'v3.0' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
Diffstat (limited to 'fs/nfs/internal.h')
-rw-r--r-- | fs/nfs/internal.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index b9056cbe68d6..2a55347a2daa 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h @@ -45,6 +45,17 @@ static inline void nfs_attr_check_mountpoint(struct super_block *parent, struct fattr->valid |= NFS_ATTR_FATTR_MOUNTPOINT; } +static inline int nfs_attr_use_mounted_on_fileid(struct nfs_fattr *fattr) +{ + if (((fattr->valid & NFS_ATTR_FATTR_MOUNTED_ON_FILEID) == 0) || + (((fattr->valid & NFS_ATTR_FATTR_MOUNTPOINT) == 0) && + ((fattr->valid & NFS_ATTR_FATTR_V4_REFERRAL) == 0))) + return 0; + + fattr->fileid = fattr->mounted_on_fileid; + return 1; +} + struct nfs_clone_mount { const struct super_block *sb; const struct dentry *dentry; |