]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
NFSv4: Clear the NFS_CAP_XATTR flag if not supported by the server
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 29 Aug 2025 16:15:12 +0000 (09:15 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Oct 2025 11:35:36 +0000 (13:35 +0200)
[ Upstream commit 4fb2b677fc1f70ee642c0beecc3cabf226ef5707 ]

nfs_server_set_fsinfo() shouldn't assume that NFS_CAP_XATTR is unset
on entry to the function.

Fixes: b78ef845c35d ("NFSv4.2: query the server for extended attribute support")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/client.c

index ac2fbbba1521ac7e4d7b7d3e0edcb5ac710edd1e..6134101184fae427c4485f18321b12f062bc44fa 100644 (file)
@@ -850,6 +850,8 @@ static void nfs_server_set_fsinfo(struct nfs_server *server,
 
        if (fsinfo->xattr_support)
                server->caps |= NFS_CAP_XATTR;
+       else
+               server->caps &= ~NFS_CAP_XATTR;
 #endif
 }