Skip to content

Commit

Permalink
btrfs: Print Warning only if ENOSPC_DEBUG is enabled
Browse files Browse the repository at this point in the history
Dont print warning for ENOSPC error unless ENOSPC_DEBUG is enabled. Use
btrfs_debug if it is enabled.

Signed-off-by: Ashish Samant <ashish.samant@oracle.com>
[ preserve the WARN_ON ]
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
Ashish Samant authored and David Sterba committed Mar 14, 2016
1 parent 07c9a8e commit 2e3fcb1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fs/btrfs/delayed-inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -650,9 +650,14 @@ 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)) {
btrfs_debug(root->fs_info,
"block rsv migrate returned %d", ret);
WARN_ON(1);
}
/*
* Ok this is a problem, let's just steal from the global rsv
* since this really shouldn't happen that often.
Expand Down

0 comments on commit 2e3fcb1

Please sign in to comment.