]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Sep 2025 14:32:01 +0000 (16:32 +0200)
[ Upstream commit 31f1a960ad1a14def94fa0b8c25d62b4c032813f ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/nfs4proc.c

index 6debcfc63222d20169d1987909bb99015ff0e252..bc1eaabaf2c309780417e79fa7f1b961333ac93f 100644 (file)
@@ -3951,7 +3951,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),