aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4xdr.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-15 11:16:53 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-15 11:16:53 -0400
commit37ca506adc395a028cd12760eca419dd0dc14b5c (patch)
treebab6f2644ef6bda4df1518f7063852012b69f458 /fs/nfsd/nfs4xdr.c
parentb9090071a57185707c27b9d61b81bf941dbdf122 (diff)
parenta16e92edcd0a2846455a30823e1bac964e743baa (diff)
Merge branch 'nfs-server-stable' of git://linux-nfs.org/~bfields/linux
* 'nfs-server-stable' of git://linux-nfs.org/~bfields/linux: knfsd: query filesystem for NFSv4 getattr of FATTR4_MAXNAME knfsd: nfsv4 delegation recall should take reference on client knfsd: don't shutdown callbacks until nfsv4 client is freed knfsd: let nfsd manage timing out its own leases knfsd: Add source address to sunrpc svc errors knfsd: 64 bit ino support for NFS server svcgss: move init code into separate function knfsd: remove code duplication in nfsd4_setclientid() nfsd warning fix knfsd: fix callback rpc cred knfsd: move nfsv4 slab creation/destruction to module init/exit knfsd: spawn kernel thread to probe callback channel knfsd: nfs4 name->id mapping not correctly parsing negative downcall knfsd: demote some printk()s to dprintk()s knfsd: cleanup of nfsd4 cmp_* functions knfsd: delete code made redundant by map_new_errors nfsd: fix horrible indentation in nfsd_setattr nfsd: remove unused cache_for_each macro nfsd: tone down inaccurate dprintk
Diffstat (limited to 'fs/nfsd/nfs4xdr.c')
-rw-r--r--fs/nfsd/nfs4xdr.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 8ef0964179bc..e15f2cf8ac15 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -1475,7 +1475,8 @@ nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp,
1475 err = vfs_getattr(exp->ex_mnt, dentry, &stat); 1475 err = vfs_getattr(exp->ex_mnt, dentry, &stat);
1476 if (err) 1476 if (err)
1477 goto out_nfserr; 1477 goto out_nfserr;
1478 if ((bmval0 & (FATTR4_WORD0_FILES_FREE | FATTR4_WORD0_FILES_TOTAL)) || 1478 if ((bmval0 & (FATTR4_WORD0_FILES_FREE | FATTR4_WORD0_FILES_TOTAL |
1479 FATTR4_WORD0_MAXNAME)) ||
1479 (bmval1 & (FATTR4_WORD1_SPACE_AVAIL | FATTR4_WORD1_SPACE_FREE | 1480 (bmval1 & (FATTR4_WORD1_SPACE_AVAIL | FATTR4_WORD1_SPACE_FREE |
1480 FATTR4_WORD1_SPACE_TOTAL))) { 1481 FATTR4_WORD1_SPACE_TOTAL))) {
1481 err = vfs_statfs(dentry, &statfs); 1482 err = vfs_statfs(dentry, &statfs);
@@ -1679,7 +1680,7 @@ out_acl:
1679 if (bmval0 & FATTR4_WORD0_FILEID) { 1680 if (bmval0 & FATTR4_WORD0_FILEID) {
1680 if ((buflen -= 8) < 0) 1681 if ((buflen -= 8) < 0)
1681 goto out_resource; 1682 goto out_resource;
1682 WRITE64((u64) stat.ino); 1683 WRITE64(stat.ino);
1683 } 1684 }
1684 if (bmval0 & FATTR4_WORD0_FILES_AVAIL) { 1685 if (bmval0 & FATTR4_WORD0_FILES_AVAIL) {
1685 if ((buflen -= 8) < 0) 1686 if ((buflen -= 8) < 0)
@@ -1721,7 +1722,7 @@ out_acl:
1721 if (bmval0 & FATTR4_WORD0_MAXNAME) { 1722 if (bmval0 & FATTR4_WORD0_MAXNAME) {
1722 if ((buflen -= 4) < 0) 1723 if ((buflen -= 4) < 0)
1723 goto out_resource; 1724 goto out_resource;
1724 WRITE32(~(u32) 0); 1725 WRITE32(statfs.f_namelen);
1725 } 1726 }
1726 if (bmval0 & FATTR4_WORD0_MAXREAD) { 1727 if (bmval0 & FATTR4_WORD0_MAXREAD) {
1727 if ((buflen -= 8) < 0) 1728 if ((buflen -= 8) < 0)
@@ -1821,16 +1822,15 @@ out_acl:
1821 WRITE32(stat.mtime.tv_nsec); 1822 WRITE32(stat.mtime.tv_nsec);
1822 } 1823 }
1823 if (bmval1 & FATTR4_WORD1_MOUNTED_ON_FILEID) { 1824 if (bmval1 & FATTR4_WORD1_MOUNTED_ON_FILEID) {
1824 struct dentry *mnt_pnt, *mnt_root;
1825
1826 if ((buflen -= 8) < 0) 1825 if ((buflen -= 8) < 0)
1827 goto out_resource; 1826 goto out_resource;
1828 mnt_root = exp->ex_mnt->mnt_root; 1827 if (exp->ex_mnt->mnt_root->d_inode == dentry->d_inode) {
1829 if (mnt_root->d_inode == dentry->d_inode) { 1828 err = vfs_getattr(exp->ex_mnt->mnt_parent,
1830 mnt_pnt = exp->ex_mnt->mnt_mountpoint; 1829 exp->ex_mnt->mnt_mountpoint, &stat);
1831 WRITE64((u64) mnt_pnt->d_inode->i_ino); 1830 if (err)
1832 } else 1831 goto out_nfserr;
1833 WRITE64((u64) stat.ino); 1832 }
1833 WRITE64(stat.ino);
1834 } 1834 }
1835 *attrlenp = htonl((char *)p - (char *)attrlenp - 4); 1835 *attrlenp = htonl((char *)p - (char *)attrlenp - 4);
1836 *countp = p - buffer; 1836 *countp = p - buffer;