[PATCH 6.18 1052/1250] afs: Fix missing kunmap in afs_dir_search_bucket()
Greg Kroah-Hartman
gregkh at linuxfoundation.org
Thu Sep 17 08:14:07 PDT 2026
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Howells <dhowells at redhat.com>
commit 950ae84b5cc944fbe27d81806d0b76af765f779c upstream.
Fix afs_dir_search_bucket() to kunmap the block it's using in the "bad:"
path.
Fixes: a5b5beebcf96 ("afs: Use the contained hashtable to search a directory")
Closes: https://sashiko.dev/#/patchset/20260716103030.3065561-1-dhowells%40redhat.com
Signed-off-by: David Howells <dhowells at redhat.com>
Link: https://patch.msgid.link/20260902121024.3328255-2-dhowells@redhat.com
cc: Marc Dionne <marc.dionne at auristor.com>
cc: linux-afs at lists.infradead.org
cc: linux-fsdevel at vger.kernel.org
cc: stable at vger.kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner at kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
---
fs/afs/dir_search.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/fs/afs/dir_search.c
+++ b/fs/afs/dir_search.c
@@ -173,12 +173,11 @@ int afs_dir_search_bucket(struct afs_dir
ret = -ENOENT;
found:
+bad:
if (iter->block) {
kunmap_local(iter->block);
iter->block = NULL;
}
-
-bad:
if (ret == -ESTALE)
afs_invalidate_dir(iter->dvnode, afs_dir_invalid_iter_stale);
_leave(" = %d", ret);
More information about the linux-afs
mailing list