[PATCH v2 0/2] NFS: Fix exception handling in nfs_alloc_server()

Markus Elfring <[email protected]>
Newsgroups gmane.linux.kernel.janitors,gmane.linux.nfs,gmane.linux.kernel
Message-ID <[email protected]>
From: Markus Elfring <[email protected]>
Date: Sun, 14 Jun 2026 10:28:05 +0200
Subject: [PATCH v2 0/2] NFS: Fix exception handling in nfs_alloc_server()

A few update suggestions were taken into account from source code analysis.

Markus Elfring (2):
  Prevent resource leak
  Use common error handling code


v2:
Christophe Jaillet pointed out that ida_free() should be called in
the error handling path after a successful ida_alloc() call.
Thus corresponding tags were added.

See also:
https://elixir.bootlin.com/linux/v7.1-rc7/source/lib/idr.c#L549-L595


 fs/nfs/client.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

-- 
2.54.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.