summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2026-09-03 13:15:46 +0100
committerDavid Sterba <dsterba@suse.com>2026-09-07 18:36:14 +0200
commit36f9aafa46f5b9fecf92d9218c5574f1ef6b4907 (patch)
tree33a19b29f3b5f6db272aeffcfe42ad67e830a18b /scripts/Makefile.thinlto
parent776924b2d9c451fc9dcc40673d17ff255bbc0fef (diff)
downloadlinux-stable-36f9aafa46f5b9fecf92d9218c5574f1ef6b4907.tar.gz
linux-stable-36f9aafa46f5b9fecf92d9218c5574f1ef6b4907.zip
btrfs: fix unnecessary transaction commit fallback from btrfs_log_all_parents()
When btrfs_log_all_parents() returns without doing any work (because all parent directories were already logged), it returns 1, which is propagated up the fsync call chain up to btrfs_log_dentry_safe(), and that causes btrfs_sync_file() to trigger am unnecessary transaction commit. This all happens because the call to btrfs_search_slot() in btrfs_log_all_parents() always returns 1, as there can not be any inode ref keys with an offset 0 (an invalid inode number), so if the while loop below it does not do any work because all parent directories were already logged, the 'ret' variable remains with a value of 1, which is then returned up the call chain to btrfs_sync_file(). Fix this by setting 'ret' to 0 after the call to btrfs_search_slot(). Fixes: 0f24ea456ae1 ("btrfs: tracepoints: add trace event for btrfs_log_all_parents()") Reviewed-by: Boris Burkov <boris@bur.io> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions