fs/btrfs: use WARN
Use WARN rather than printk followed by WARN_ON(1), for conciseness. A simplified version of the semantic patch that makes this transformation is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression list es; @@ -printk( +WARN(1, es); -WARN_ON(1); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Reviewed-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
This commit is contained in:

committed by
Josef Bacik

parent
5269b67e3d
commit
31b1a2bd75
@@ -145,16 +145,12 @@ loop:
|
||||
* the log must never go across transaction boundaries.
|
||||
*/
|
||||
smp_mb();
|
||||
if (!list_empty(&fs_info->tree_mod_seq_list)) {
|
||||
printk(KERN_ERR "btrfs: tree_mod_seq_list not empty when "
|
||||
if (!list_empty(&fs_info->tree_mod_seq_list))
|
||||
WARN(1, KERN_ERR "btrfs: tree_mod_seq_list not empty when "
|
||||
"creating a fresh transaction\n");
|
||||
WARN_ON(1);
|
||||
}
|
||||
if (!RB_EMPTY_ROOT(&fs_info->tree_mod_log)) {
|
||||
printk(KERN_ERR "btrfs: tree_mod_log rb tree not empty when "
|
||||
if (!RB_EMPTY_ROOT(&fs_info->tree_mod_log))
|
||||
WARN(1, KERN_ERR "btrfs: tree_mod_log rb tree not empty when "
|
||||
"creating a fresh transaction\n");
|
||||
WARN_ON(1);
|
||||
}
|
||||
atomic_set(&fs_info->tree_mod_seq, 0);
|
||||
|
||||
spin_lock_init(&cur_trans->commit_lock);
|
||||
|
Reference in New Issue
Block a user