VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   57 Tags
author: Desmond Cheong Zhi Xi <desmondcheongzx@gmail.com> 2021-07-27 15:13:03 +0800 committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2021-08-04 12:47:47 +0200 commit: c543bced163b7c225e4bd9e7bf3d810acd1b2d46 parent: 9e4417af187e0b7eb44b188207fb675a1e2f235c
Commit Summary:
btrfs: fix rw device counting in __btrfs_free_extra_devids
Diffstat:
1 file changed, 1 insertion, 0 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 38633ab8108b..9f723b744863 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -1078,6 +1078,7 @@ static void __btrfs_free_extra_devids(struct btrfs_fs_devices *fs_devices,
 		if (test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state)) {
 			list_del_init(&device->dev_alloc_list);
 			clear_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state);
+			fs_devices->rw_devices--;
 		}
 		list_del_init(&device->dev_list);
 		fs_devices->num_devices--;