]> www.infradead.org Git - users/hch/misc.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)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 29 Aug 2025 16:56:43 +0000 (12:56 -0400)
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>
fs/nfs/client.c

index 8fb4a950dd5581d6bcd7150ae588a774a263ffc2..4e3dcc157a83c857bebf8c69b5a56e49d0f6a2dc 100644 (file)
@@ -888,6 +888,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
 }