Commit 06c23d08 authored by Wang Shilong's avatar Wang Shilong Committed by Greg Kroah-Hartman

Btrfs: handle EAGAIN case properly in btrfs_drop_snapshot()

commit 90515e7f upstream.

We may return early in btrfs_drop_snapshot(), we shouldn't
call btrfs_std_err() for this case, fix it.
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>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9e7fe101
......@@ -7033,7 +7033,7 @@ int btrfs_drop_snapshot(struct btrfs_root *root,
*/
if (root_dropped == false)
btrfs_add_dead_root(root);
if (err)
if (err && err != -EAGAIN)
btrfs_std_error(root->fs_info, 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