Patch "afs: Fix afs_edit_dir_remove() to get, not find, block 0" has been added to the 7.1-stable tree

gregkh at linuxfoundation.org gregkh at linuxfoundation.org
Wed Jul 29 06:39:13 PDT 2026


This is a note to let you know that I've just added the patch titled

    afs: Fix afs_edit_dir_remove() to get, not find, block 0

to the 7.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     afs-fix-afs_edit_dir_remove-to-get-not-find-block-0.patch
and it can be found in the queue-7.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable at vger.kernel.org> know about it.


>From 62d9853aa4ce6e9797b6949804891be14b219752 Mon Sep 17 00:00:00 2001
From: David Howells <dhowells at redhat.com>
Date: Mon, 13 Jul 2026 16:22:55 +0100
Subject: afs: Fix afs_edit_dir_remove() to get, not find, block 0

From: David Howells <dhowells at redhat.com>

commit 62d9853aa4ce6e9797b6949804891be14b219752 upstream.

Fix afs_edit_dir_remove() to use afs_dir_get_block() to get block 0 rather
than afs_dir_find_block() as the latter caches the found block in the
afs_dir_iter and may[*] switch out the page it's on if another
afs_dir_find_block() is done.  This parallels what afs_edit_dir_add() does.

[*] There's more than one block per page.

Fixes: a5b5beebcf96 ("afs: Use the contained hashtable to search a directory")
Closes: https://sashiko.dev/#/patchset/20260706153408.1231650-1-dhowells%40redhat.com
Signed-off-by: David Howells <dhowells at redhat.com>
Link: https://patch.msgid.link/2380759.1783956175@warthog.procyon.org.uk
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_edit.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/afs/dir_edit.c
+++ b/fs/afs/dir_edit.c
@@ -415,7 +415,7 @@ void afs_edit_dir_remove(struct afs_vnod
 	if (!afs_dir_init_iter(&iter, name))
 		return;
 
-	meta = afs_dir_find_block(&iter, 0);
+	meta = afs_dir_get_block(&iter, 0);
 	if (!meta)
 		return;
 


Patches currently in stable-queue which might be from dhowells at redhat.com are

queue-7.1/afs-fix-afs_edit_dir_remove-to-get-not-find-block-0.patch



More information about the linux-afs mailing list