]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
NFS: Decrement refcounts if allocating nfs_free_stateid_data fails
authorAnna Schumaker <anna.schumaker@hammerspace.com>
Tue, 30 Jun 2026 19:39:45 +0000 (15:39 -0400)
committerAnna Schumaker <anna.schumaker@hammerspace.com>
Mon, 20 Jul 2026 15:04:04 +0000 (11:04 -0400)
commit4aeb63d5ac2dba2a474e7b64d60776d9dd1c6cd2
tree4e48598aece31d80c74bdced9c761ad951194a28
parentcf616096a0f3a2b60f7d68b6b39674a6867ded9c
NFS: Decrement refcounts if allocating nfs_free_stateid_data fails

I noticed that we were immediately exiting this function if the
allocation fails, leaving the client and server object refcounts bumped.
Fix this by creating a common exit point to clean up dangling
references.

Fixes: 576acc259146 ("nfs4: take a reference on the nfs_client when running FREE_STATEID")
Signed-off-by: Anna Schumaker <anna.schumaker@hammerspace.com>
fs/nfs/nfs4proc.c