浏览代码

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>
Trond Myklebust 15 年之前
父节点
当前提交
a06b1261bd
共有 2 个文件被更改,包括 1 次插入13 次删除
  1. 1 6
      fs/nfsd/nfs4proc.c
  2. 0 7
      fs/nfsd/nfs4xdr.c

+ 1 - 6
fs/nfsd/nfs4proc.c

@@ -68,7 +68,6 @@ check_attr_support(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
 		   u32 *bmval, u32 *writable)
 		   u32 *bmval, u32 *writable)
 {
 {
 	struct dentry *dentry = cstate->current_fh.fh_dentry;
 	struct dentry *dentry = cstate->current_fh.fh_dentry;
-	struct svc_export *exp = cstate->current_fh.fh_export;
 
 
 	/*
 	/*
 	 * Check about attributes are supported by the NFSv4 server or not.
 	 * 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,
 		return nfserr_attrnotsupp;
 		return nfserr_attrnotsupp;
 
 
 	/*
 	/*
-	 * Check FATTR4_WORD0_ACL & FATTR4_WORD0_FS_LOCATIONS can be supported
+	 * Check FATTR4_WORD0_ACL can be supported
 	 * in current environment or not.
 	 * in current environment or not.
 	 */
 	 */
 	if (bmval[0] & FATTR4_WORD0_ACL) {
 	if (bmval[0] & FATTR4_WORD0_ACL) {
 		if (!IS_POSIXACL(dentry->d_inode))
 		if (!IS_POSIXACL(dentry->d_inode))
 			return nfserr_attrnotsupp;
 			return nfserr_attrnotsupp;
 	}
 	}
-	if (bmval[0] & FATTR4_WORD0_FS_LOCATIONS) {
-		if (exp->ex_fslocs.locations == NULL)
-			return nfserr_attrnotsupp;
-	}
 
 
 	/*
 	/*
 	 * According to spec, read-only attributes return ERR_INVAL.
 	 * According to spec, read-only attributes return ERR_INVAL.

+ 0 - 7
fs/nfsd/nfs4xdr.c

@@ -1793,11 +1793,6 @@ nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp,
 				goto out_nfserr;
 				goto out_nfserr;
 		}
 		}
 	}
 	}
-	if (bmval0 & FATTR4_WORD0_FS_LOCATIONS) {
-		if (exp->ex_fslocs.locations == NULL) {
-			bmval0 &= ~FATTR4_WORD0_FS_LOCATIONS;
-		}
-	}
 	if ((buflen -= 16) < 0)
 	if ((buflen -= 16) < 0)
 		goto out_resource;
 		goto out_resource;
 
 
@@ -1825,8 +1820,6 @@ nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp,
 			goto out_resource;
 			goto out_resource;
 		if (!aclsupport)
 		if (!aclsupport)
 			word0 &= ~FATTR4_WORD0_ACL;
 			word0 &= ~FATTR4_WORD0_ACL;
-		if (!exp->ex_fslocs.locations)
-			word0 &= ~FATTR4_WORD0_FS_LOCATIONS;
 		if (!word2) {
 		if (!word2) {
 			WRITE32(2);
 			WRITE32(2);
 			WRITE32(word0);
 			WRITE32(word0);