• Yu Zhiguo's avatar
    NFSv4: do exact check about attribute specified · 3c8e0316
    Yu Zhiguo authored
    Server should return NFS4ERR_ATTRNOTSUPP if an attribute specified is
    not supported in current environment.
    Operations CREATE, NVERIFY, OPEN, SETATTR and VERIFY should do this check.
    
    This bug is found when do newpynfs tests. The names of the tests that failed
    are following:
      CR12 NVF7a NVF7b NVF7c NVF7d NVF7f NVF7r NVF7s
      OPEN15 VF7a VF7b VF7c VF7d VF7f VF7r VF7s
    
    Add function do_check_fattr() to do exact check:
    1, Check attribute specified is supported by the NFSv4 server or not.
    2, Check FATTR4_WORD0_ACL & FATTR4_WORD0_FS_LOCATIONS are supported
       in current environment or not.
    3, Check attribute specified is writable or not.
    
    step 1 and 3 are done in function nfsd4_decode_fattr() but removed
    to this function now.
    Signed-off-by: default avatarYu Zhiguo <yuzg@cn.fujitsu.com>
    Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
    3c8e0316
nfs4xdr.c 82.1 KB