aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-log.c
diff options
context:
space:
mode:
authorFilipe Manana <[email protected]>2025-05-29 15:25:29 +0000
committerDavid Sterba <[email protected]>2025-07-21 21:53:29 +0000
commit181436a85b16f9fa860d407ed37c726149fc3301 (patch)
tree23195766af8d9797f3046835e409d4f95e722138 /fs/btrfs/tree-log.c
parentbtrfs: use btrfs_del_item() at del_logged_dentry() (diff)
downloadkernel-181436a85b16f9fa860d407ed37c726149fc3301.tar.gz
kernel-181436a85b16f9fa860d407ed37c726149fc3301.zip
btrfs: assert we join log transaction at btrfs_del_dir_entries_in_log()
We are supposed to be able to join a log transaction at that point, since we have determined that the inode was logged in the current transaction with the call to inode_logged(). So ASSERT() we joined a log transaction and also warn if we didn't in case assertions are disabled (the kernel config doesn't have CONFIG_BTRFS_ASSERT=y), so that the issue gets noticed and reported if it ever happens. Reviewed-by: Boris Burkov <[email protected]> Signed-off-by: Filipe Manana <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r--fs/btrfs/tree-log.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index cb20f124812a..58984ca2bfad 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -3473,7 +3473,8 @@ void btrfs_del_dir_entries_in_log(struct btrfs_trans_handle *trans,
}
ret = join_running_log_trans(root);
- if (ret)
+ ASSERT(ret == 0, "join_running_log_trans() ret=%d", ret);
+ if (WARN_ON(ret))
return;
mutex_lock(&dir->log_mutex);