diff options
| author | 2025-05-28 15:28:26 +0100 | |
|---|---|---|
| committer | 2025-07-21 23:53:29 +0200 | |
| commit | d94edb0d7e38e520174c0846afa5337319c1ac5f (patch) | |
| tree | 3b66a460034cbd97f19397d5c53b716d1acf8865 /fs/btrfs/tree-log.c | |
| parent | btrfs: open code fc_mount() to avoid releasing s_umount rw_sempahore (diff) | |
| download | linux-rng-d94edb0d7e38e520174c0846afa5337319c1ac5f.tar.xz linux-rng-d94edb0d7e38e520174c0846afa5337319c1ac5f.zip | |
btrfs: assert we join log transaction at btrfs_del_inode_ref_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>
Diffstat (limited to 'fs/btrfs/tree-log.c')
| -rw-r--r-- | fs/btrfs/tree-log.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index cc384f78dd21..9420568131ab 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -3513,7 +3513,8 @@ void btrfs_del_inode_ref_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; log = root->log_root; mutex_lock(&inode->log_mutex); |
