Skip to contentSkip to conversation

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

PATCH Applied David Howells 2 participants 2 messages Jul 13 – Jul 23

Subsystems (3)
lore
Share & tools
lore

David Howells

author maintainer
#0 lore raw

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

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")
cc Marc Dionne <[email protected]>
---
 fs/afs/dir_edit.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/afs/dir_edit.c +1 -1
index b3e80c5c434f..01c6265e8865 100644
@@ -411,7 +411,7 @@ void afs_edit_dir_remove(struct afs_vnode *vnode,
 	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;
 
maintainer Applied
#1 lore raw
Quoted 1 line · David Howells

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

Applied to the vfs.fixes branch of the vfs/vfs.git tree. Patches in the vfs.fixes branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.fixes

[1/1] afs: Fix afs_edit_dir_remove() to get, not find, block 0

      https://git.kernel.org/vfs/vfs/c/4fca9568c67d