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
@@ -3397,14 +3397,12 @@ void btrfs_mark_buffer_dirty(struct extent_buffer *buf)
|
||||
int was_dirty;
|
||||
|
||||
btrfs_assert_tree_locked(buf);
|
||||
if (transid != root->fs_info->generation) {
|
||||
printk(KERN_CRIT "btrfs transid mismatch buffer %llu, "
|
||||
if (transid != root->fs_info->generation)
|
||||
WARN(1, KERN_CRIT "btrfs transid mismatch buffer %llu, "
|
||||
"found %llu running %llu\n",
|
||||
(unsigned long long)buf->start,
|
||||
(unsigned long long)transid,
|
||||
(unsigned long long)root->fs_info->generation);
|
||||
WARN_ON(1);
|
||||
}
|
||||
was_dirty = set_extent_buffer_dirty(buf);
|
||||
if (!was_dirty) {
|
||||
spin_lock(&root->fs_info->delalloc_lock);
|
||||
|
Reference in New Issue
Block a user