]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
btrfs: Print Warning only if ENOSPC_DEBUG is enabled
authorAshish Samant <ashish.samant@oracle.com>
Sat, 17 Oct 2015 02:11:14 +0000 (19:11 -0700)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Fri, 20 Nov 2015 01:59:30 +0000 (17:59 -0800)
Orabug: 21626666

Signed-off-by : Ashish Samant <ashish.samant@oracle.com>
Reviewed-by: Bo Liu <bo.li.liu@oracle.com>
fs/btrfs/delayed-inode.c

index a2ae42720a6afe92701de402b837d56dd66d03b4..b86cfd9bb091084aa93cc355f963d7ec0363a96c 100644 (file)
@@ -652,9 +652,13 @@ static int btrfs_delayed_inode_reserve_metadata(
                        goto out;
 
                ret = btrfs_block_rsv_migrate(src_rsv, dst_rsv, num_bytes);
-               if (!WARN_ON(ret))
+               if (!ret)
                        goto out;
 
+               if (btrfs_test_opt(root, ENOSPC_DEBUG))
+                       WARN(1, KERN_DEBUG
+                            "btrfs: block rsv migrate returned %d\n", ret);
+
                /*
                 * Ok this is a problem, let's just steal from the global rsv
                 * since this really shouldn't happen that often.