Skip to content

Commit b39234e

Browse files
Trond Myklebustgregkh
authored andcommitted
NFSv4: Clear the NFS_CAP_FS_LOCATIONS flag if it is not set
[ Upstream commit dd5a862 ] _nfs4_server_capabilities() is expected to clear any flags that are not supported by the server. Fixes: 8a59bb9 ("NFSv4 store server support for fs_location attribute") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent a022c9a commit b39234e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fs/nfs/nfs4proc.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3882,8 +3882,9 @@ static int _nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *f
38823882
res.attr_bitmask[2] &= FATTR4_WORD2_NFS42_MASK;
38833883
}
38843884
memcpy(server->attr_bitmask, res.attr_bitmask, sizeof(server->attr_bitmask));
3885-
server->caps &= ~(NFS_CAP_ACLS | NFS_CAP_HARDLINKS |
3886-
NFS_CAP_SYMLINKS| NFS_CAP_SECURITY_LABEL);
3885+
server->caps &=
3886+
~(NFS_CAP_ACLS | NFS_CAP_HARDLINKS | NFS_CAP_SYMLINKS |
3887+
NFS_CAP_SECURITY_LABEL | NFS_CAP_FS_LOCATIONS);
38873888
server->fattr_valid = NFS_ATTR_FATTR_V4;
38883889
if (res.attr_bitmask[0] & FATTR4_WORD0_ACL &&
38893890
res.acl_bitmask & ACL4_SUPPORT_ALLOW_ACL)

0 commit comments

Comments
 (0)