From: Trond Myklebust Date: Fri, 29 Aug 2025 16:15:12 +0000 (-0700) Subject: NFSv4: Clear the NFS_CAP_XATTR flag if not supported by the server X-Git-Tag: v6.6.107~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=781ec30354e62e757f5f8f78eba8be764a99585d;p=thirdparty%2Fkernel%2Fstable.git NFSv4: Clear the NFS_CAP_XATTR flag if not supported by the server [ 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 Signed-off-by: Sasha Levin --- diff --git a/fs/nfs/client.c b/fs/nfs/client.c index cc764da581c43..1bcdaee7e856f 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c @@ -873,6 +873,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 }