From: Trond Myklebust Date: Fri, 29 Aug 2025 16:02:16 +0000 (-0700) Subject: NFSv4: Don't clear capabilities that won't be reset X-Git-Tag: v6.12.48~121 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2bc206085642cf6b688ac758d8063e3a3650a48c;p=thirdparty%2Fkernel%2Fstable.git NFSv4: Don't clear capabilities that won't be reset [ 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 Fixes: b01f21cacde9 ("NFS: Fix the setting of capabilities when automounting a new filesystem") Signed-off-by: Trond Myklebust Signed-off-by: Sasha Levin --- diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index e6b7cbc06c9c8..3ac8ecad2e53a 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -4064,7 +4064,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),