Commit d94edb0d authored by Filipe Manana's avatar Filipe Manana Committed by David Sterba
Browse files

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: default avatarBoris Burkov <boris@bur.io>
Signed-off-by: default avatarFilipe Manana <fdmanana@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 75764b41
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);