]> git.hungrycats.org Git - linux/commit
btrfs: don't force read-only after error in drop snapshot
authorDavid Sterba <dsterba@suse.com>
Tue, 25 Feb 2020 14:05:53 +0000 (15:05 +0100)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Mon, 31 Aug 2020 01:45:25 +0000 (21:45 -0400)
commite30c93df8d5ce91a5e50aadcef86b5e31d5554f9
tree1eddbbc829e003239b424cda715d957fc1625939
parent161ea35863271bfaeb5014b74d87ed11dbefd521
btrfs: don't force read-only after error in drop snapshot

Deleting a subvolume on a full filesystem leads to ENOSPC followed by a
forced read-only. This is not a transaction abort and the filesystem is
otherwise ok, so the error should be just propagated to the callers.

This is caused by unnecessary call to btrfs_handle_fs_error for all
errors, except EAGAIN. This does not make sense as the standard
transaction abort mechanism is in btrfs_drop_snapshot so all relevant
failures are handled.

Originally in commit cb1b69f4508a ("Btrfs: forced readonly when
btrfs_drop_snapshot() fails") there was no return value at all, so the
btrfs_std_error made some sense but once the error handling and
propagation has been implemented we don't need it anymore.

Signed-off-by: David Sterba <dsterba@suse.com>
(cherry picked from commit 7c09c03091ac562ddca2b393e5d65c1d37da79f1)
fs/btrfs/extent-tree.c