diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-08-31 15:16:11 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2009-09-01 20:00:17 -0400 |
commit | a06b1261bdb580b35967d0e055d1ab131b332254 (patch) | |
tree | 7ce3f00974741f29dcb815f427c242fe3384ca62 /fs/nfsd | |
parent | 468de9e54a900559b55aa939a4daeaea1915e572 (diff) |
NFSD: Fix a bug in the NFSv4 'supported attrs' mandatory attribute
The fact that the filesystem doesn't currently list any alternate
locations does _not_ imply that the fs_locations attribute should be
marked as "unsupported".
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/nfs4proc.c | 7 | ||||
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 7 |
2 files changed, 1 insertions, 13 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 6fde431df9ee..bebc0c2e1b0a 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c | |||
@@ -68,7 +68,6 @@ check_attr_support(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | |||
68 | u32 *bmval, u32 *writable) | 68 | u32 *bmval, u32 *writable) |
69 | { | 69 | { |
70 | struct dentry *dentry = cstate->current_fh.fh_dentry; | 70 | struct dentry *dentry = cstate->current_fh.fh_dentry; |
71 | struct svc_export *exp = cstate->current_fh.fh_export; | ||
72 | 71 | ||
73 | /* | 72 | /* |
74 | * Check about attributes are supported by the NFSv4 server or not. | 73 | * Check about attributes are supported by the NFSv4 server or not. |
@@ -80,17 +79,13 @@ check_attr_support(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | |||
80 | return nfserr_attrnotsupp; | 79 | return nfserr_attrnotsupp; |
81 | 80 | ||
82 | /* | 81 | /* |
83 | * Check FATTR4_WORD0_ACL & FATTR4_WORD0_FS_LOCATIONS can be supported | 82 | * Check FATTR4_WORD0_ACL can be supported |
84 | * in current environment or not. | 83 | * in current environment or not. |
85 | */ | 84 | */ |
86 | if (bmval[0] & FATTR4_WORD0_ACL) { | 85 | if (bmval[0] & FATTR4_WORD0_ACL) { |
87 | if (!IS_POSIXACL(dentry->d_inode)) | 86 | if (!IS_POSIXACL(dentry->d_inode)) |
88 | return nfserr_attrnotsupp; | 87 | return nfserr_attrnotsupp; |
89 | } | 88 | } |
90 | if (bmval[0] & FATTR4_WORD0_FS_LOCATIONS) { | ||
91 | if (exp->ex_fslocs.locations == NULL) | ||
92 | return nfserr_attrnotsupp; | ||
93 | } | ||
94 | 89 | ||
95 | /* | 90 | /* |
96 | * According to spec, read-only attributes return ERR_INVAL. | 91 | * According to spec, read-only attributes return ERR_INVAL. |
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index fdf632bf1cfe..20c5e3db0660 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c | |||
@@ -1793,11 +1793,6 @@ nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp, | |||
1793 | goto out_nfserr; | 1793 | goto out_nfserr; |
1794 | } | 1794 | } |
1795 | } | 1795 | } |
1796 | if (bmval0 & FATTR4_WORD0_FS_LOCATIONS) { | ||
1797 | if (exp->ex_fslocs.locations == NULL) { | ||
1798 | bmval0 &= ~FATTR4_WORD0_FS_LOCATIONS; | ||
1799 | } | ||
1800 | } | ||
1801 | if ((buflen -= 16) < 0) | 1796 | if ((buflen -= 16) < 0) |
1802 | goto out_resource; | 1797 | goto out_resource; |
1803 | 1798 | ||
@@ -1825,8 +1820,6 @@ nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp, | |||
1825 | goto out_resource; | 1820 | goto out_resource; |
1826 | if (!aclsupport) | 1821 | if (!aclsupport) |
1827 | word0 &= ~FATTR4_WORD0_ACL; | 1822 | word0 &= ~FATTR4_WORD0_ACL; |
1828 | if (!exp->ex_fslocs.locations) | ||
1829 | word0 &= ~FATTR4_WORD0_FS_LOCATIONS; | ||
1830 | if (!word2) { | 1823 | if (!word2) { |
1831 | WRITE32(2); | 1824 | WRITE32(2); |
1832 | WRITE32(word0); | 1825 | WRITE32(word0); |