diff options
Diffstat (limited to 'fs/nfsd/nfs4xdr.c')
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 8ef0964179bc..9cf900740c76 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c | |||
@@ -1679,7 +1679,7 @@ out_acl: | |||
1679 | if (bmval0 & FATTR4_WORD0_FILEID) { | 1679 | if (bmval0 & FATTR4_WORD0_FILEID) { |
1680 | if ((buflen -= 8) < 0) | 1680 | if ((buflen -= 8) < 0) |
1681 | goto out_resource; | 1681 | goto out_resource; |
1682 | WRITE64((u64) stat.ino); | 1682 | WRITE64(stat.ino); |
1683 | } | 1683 | } |
1684 | if (bmval0 & FATTR4_WORD0_FILES_AVAIL) { | 1684 | if (bmval0 & FATTR4_WORD0_FILES_AVAIL) { |
1685 | if ((buflen -= 8) < 0) | 1685 | if ((buflen -= 8) < 0) |
@@ -1821,16 +1821,15 @@ out_acl: | |||
1821 | WRITE32(stat.mtime.tv_nsec); | 1821 | WRITE32(stat.mtime.tv_nsec); |
1822 | } | 1822 | } |
1823 | if (bmval1 & FATTR4_WORD1_MOUNTED_ON_FILEID) { | 1823 | if (bmval1 & FATTR4_WORD1_MOUNTED_ON_FILEID) { |
1824 | struct dentry *mnt_pnt, *mnt_root; | ||
1825 | |||
1826 | if ((buflen -= 8) < 0) | 1824 | if ((buflen -= 8) < 0) |
1827 | goto out_resource; | 1825 | goto out_resource; |
1828 | mnt_root = exp->ex_mnt->mnt_root; | 1826 | if (exp->ex_mnt->mnt_root->d_inode == dentry->d_inode) { |
1829 | if (mnt_root->d_inode == dentry->d_inode) { | 1827 | err = vfs_getattr(exp->ex_mnt->mnt_parent, |
1830 | mnt_pnt = exp->ex_mnt->mnt_mountpoint; | 1828 | exp->ex_mnt->mnt_mountpoint, &stat); |
1831 | WRITE64((u64) mnt_pnt->d_inode->i_ino); | 1829 | if (err) |
1832 | } else | 1830 | goto out_nfserr; |
1833 | WRITE64((u64) stat.ino); | 1831 | } |
1832 | WRITE64(stat.ino); | ||
1834 | } | 1833 | } |
1835 | *attrlenp = htonl((char *)p - (char *)attrlenp - 4); | 1834 | *attrlenp = htonl((char *)p - (char *)attrlenp - 4); |
1836 | *countp = p - buffer; | 1835 | *countp = p - buffer; |