]> git.baikalelectronics.ru Git - kernel.git/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)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 May 2020 09:25:23 +0000 (11:25 +0200)
commitd87b18a89b1bb901c28f2b2b2d7910f5ad46addd
tree66493f00f99d0a7a1e30df2d6a6203fd063325d0
parent9b3d217ee278e4d623324a486bd7e6a792a5c20f
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 9309e888f085 ("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>
fs/btrfs/extent-tree.c