Btrfs: handle EAGAIN case properly in btrfs_drop_snapshot()

commit 90515e7f5d7d24cbb2a4038a3f1b5cfa2921aa17 upstream.

We may return early in btrfs_drop_snapshot(), we shouldn't
call btrfs_std_err() for this case, fix it.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Wang Shilong 2014-01-07 17:26:58 +08:00 committed by Greg Kroah-Hartman
parent 9e7fe10110
commit 06c23d087a
1 changed files with 1 additions and 1 deletions

View File

@ -7033,7 +7033,7 @@ out:
*/
if (root_dropped == false)
btrfs_add_dead_root(root);
if (err)
if (err && err != -EAGAIN)
btrfs_std_error(root->fs_info, err);
return err;
}