Patch "btrfs: don't force read-only after error in drop snapshot" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    btrfs: don't force read-only after error in drop snapshot

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     btrfs-don-t-force-read-only-after-error-in-drop-snap.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 92711987f83c00886b99d04f4ded3a4fd4255153
Author: David Sterba <dsterba@xxxxxxxx>
Date:   Tue Feb 25 15:05:53 2020 +0100

    btrfs: don't force read-only after error in drop snapshot
    
    [ Upstream commit 7c09c03091ac562ddca2b393e5d65c1d37da79f1 ]
    
    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@xxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 31c1ed554d26d..7658f3193175b 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -5428,8 +5428,6 @@ out:
 	 */
 	if (!for_reloc && !root_dropped)
 		btrfs_add_dead_root(root);
-	if (err && err != -EAGAIN)
-		btrfs_handle_fs_error(fs_info, err, NULL);
 	return err;
 }
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux