From b55b383150a185d367dd3b7a820dbe1efc5cfc9d Mon Sep 17 00:00:00 2001 Message-ID: From: Qu Wenruo Date: Sat, 17 Jun 2023 13:15:30 +0800 Subject: [PATCH] btrfs: do not commit transaction when adding a new device This is to address a ENOSPC situation where one has to add more than one disks before having enough space to commit the current transaction. (Including the one to add a new device). Signed-off-by: Qu Wenruo --- fs/btrfs/volumes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index df43093b7a46..b8f68d58f498 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -2773,7 +2773,7 @@ int btrfs_init_new_device(struct btrfs_fs_info *fs_info, const char *device_path btrfs_sysfs_update_sprout_fsid(fs_devices); } - ret = btrfs_commit_transaction(trans); + ret = btrfs_end_transaction(trans); if (seeding_dev) { mutex_unlock(&uuid_mutex); -- 2.41.0