• S
    NFS: Ensure the NFS_CAP_SECURITY_LABEL capability is set when appropriate · 0b4f132b
    Scott Mayhew 提交于
    Commit ce62b114 ("NFS: Split attribute support out from the server
    capabilities") removed the logic from _nfs4_server_capabilities() that
    sets the NFS_CAP_SECURITY_LABEL capability based on the presence of
    FATTR4_WORD2_SECURITY_LABEL in the attr_bitmask of the server's response.
    Now NFS_CAP_SECURITY_LABEL is never set, which breaks labelled NFS.
    
    This was replaced with logic that clears the NFS_ATTR_FATTR_V4_SECURITY_LABEL
    bit in the newly added fattr_valid field based on the absence of
    FATTR4_WORD2_SECURITY_LABEL in the attr_bitmask of the server's response.
    This essentially has no effect since there's nothing looks for that bit
    in fattr_supported.
    
    So revert that part of the commit, but adding the logic that sets
    NFS_CAP_SECURITY_LABEL near where the other capabilities are set in
    _nfs4_server_capabilities().
    
    Fixes: ce62b114 ("NFS: Split attribute support out from the server capabilities")
    Signed-off-by: NScott Mayhew <smayhew@redhat.com>
    Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
    0b4f132b
nfs4proc.c 279.4 KB