]> 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>
Fri, 19 Sep 2025 14:35:43 +0000 (16: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 17edc124d03f22563c185abb3cda4d4582ae5ed6..035474f3fb8f36992beb92679e8476386ba2afb3 100644 (file)
@@ -881,6 +881,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
 }