Commit 90515e7f authored by Wang Shilong's avatar Wang Shilong Committed by Chris Mason

Btrfs: handle EAGAIN case properly in btrfs_drop_snapshot()

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: default avatarWang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: default avatarJosef Bacik <jbacik@fb.com>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent 8e56338d
...@@ -7835,7 +7835,7 @@ int btrfs_drop_snapshot(struct btrfs_root *root, ...@@ -7835,7 +7835,7 @@ int btrfs_drop_snapshot(struct btrfs_root *root,
*/ */
if (!for_reloc && root_dropped == false) if (!for_reloc && root_dropped == false)
btrfs_add_dead_root(root); btrfs_add_dead_root(root);
if (err) if (err && err != -EAGAIN)
btrfs_std_error(root->fs_info, err); btrfs_std_error(root->fs_info, err);
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment