Re: [PATCH 1/1] Btrfs: Code Cleanup

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

 





Hi Flex,


diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 366b335..5c16f04 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2325,7 +2325,10 @@ int btrfs_init_new_device(struct btrfs_root *root, char *device_path)
  	if (seeding_dev) {
  		sb->s_flags &= ~MS_RDONLY;

 This is not undone in the failure code. Theoretically
 it should report error during unmount, did you notice ?

 (in general, $subject can be more specific).

Thanks, Anand

  		ret = btrfs_prepare_sprout(root);
-		BUG_ON(ret); /* -ENOMEM */
+		if (ret) {
+			btrfs_abort_transaction(trans, root, ret);
+			goto error_trans;
+		}
  	}

  	device->fs_devices = root->fs_info->fs_devices;

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux