mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-14 01:49:20 -04:00
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 <boris@bur.io> Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
committed by
David Sterba
parent
1ed0cfc89e
commit
181436a85b
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user