Skip to content

Commit

Permalink
Btrfs: handle EAGAIN case properly in btrfs_drop_snapshot()
Browse files Browse the repository at this point in the history
We may return early in btrfs_drop_snapshot(), we shouldn't
call btrfs_std_err() for this case, fix it.

Cc: stable@vger.kernel.org
Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Chris Mason <clm@fb.com>
  • Loading branch information
Wang Shilong authored and masoncl committed Jan 28, 2014
1 parent 8e56338 commit 90515e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -7835,7 +7835,7 @@ int btrfs_drop_snapshot(struct btrfs_root *root,
*/
if (!for_reloc && root_dropped == false)
btrfs_add_dead_root(root);
if (err)
if (err && err != -EAGAIN)
btrfs_std_error(root->fs_info, err);
return err;
}
Expand Down

0 comments on commit 90515e7

Please sign in to comment.