summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.c
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2012-11-03 11:58:34 +0100
committerJosef Bacik <jbacik@fusionio.com>2012-12-12 23:15:23 +0100
commit31b1a2bd758f439fc945b3ac5899d890cb7e2dc6 (patch)
treea5659a8e51a780eb02a51c2f79c8e3c25d29bb92 /fs/btrfs/volumes.c
parentBtrfs: fix missing log when BTRFS_INODE_NEEDS_FULL_SYNC is set (diff)
downloadlinux-31b1a2bd758f439fc945b3ac5899d890cb7e2dc6.tar.xz
linux-31b1a2bd758f439fc945b3ac5899d890cb7e2dc6.zip
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>
Diffstat (limited to '')
-rw-r--r--fs/btrfs/volumes.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index eeed97d19dee..3f4bfee66d7b 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -3323,9 +3323,8 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
cur = cur->next;
if (!device->writeable) {
- printk(KERN_ERR
+ WARN(1, KERN_ERR
"btrfs: read-only device in alloc_list\n");
- WARN_ON(1);
continue;
}