NFSv4: Don't clear capabilities that won't be reset
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 29 Aug 2025 16:02:16 +0000 (09:02 -0700)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 29 Aug 2025 16:56:27 +0000 (12:56 -0400)
Don't clear the capabilities that are not going to get reset by the call
to _nfs4_server_capabilities().

Reported-by: Scott Haiden <scott.b.haiden@gmail.com>
Fixes: b01f21cacde9 ("NFS: Fix the setting of capabilities when automounting a new filesystem")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/nfs4proc.c

index 7d2b67e06cc37f4be64e4c4eedb280cba1c40e6e..5b92fcf45dd7d9f4a92d05313bfbadedb382f02d 100644 (file)
@@ -4092,7 +4092,6 @@ int nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fhandle)
        };
        int err;
 
-       nfs_server_set_init_caps(server);
        do {
                err = nfs4_handle_exception(server,
                                _nfs4_server_capabilities(server, fhandle),