From: Filipe Manana Date: Thu, 29 May 2025 15:12:45 +0000 (+0100) Subject: btrfs: use btrfs_del_item() at del_logged_dentry() X-Git-Tag: block-6.17-20250808~77^2~143 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=1ed0cfc89e992112b5e5f5677c17081e0eee688d;p=linux-block.git btrfs: use btrfs_del_item() at del_logged_dentry() There's no need to use btrfs_delete_one_dir_name() at del_logged_dentry() because we are processing a dir index key which can contain only a single name, unlike dir item keys which can encode multiple names in case of name hash collisions. We have explicitly looked up for a dir index key by calling btrfs_lookup_dir_index_item() and we don't log dir item keys anymore (since commit 339d03542484 ("btrfs: only copy dir index keys when logging a directory")). So simplify and use btrfs_del_item() directly instead of btrfs_delete_one_dir_name(). Reviewed-by: Boris Burkov Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 9420568131ab..cb20f124812a 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -3432,7 +3432,7 @@ static int del_logged_dentry(struct btrfs_trans_handle *trans, * inode item because on log replay we update the field to reflect * all existing entries in the directory (see overwrite_item()). */ - return btrfs_delete_one_dir_name(trans, log, path, di); + return btrfs_del_item(trans, log, path); } /*