On 2017年09月25日 20:31, Anand Jain wrote:
Signed-off-by: Anand Jain <anand.j...@oracle.com>
The error_trans tag needs to revert the RDONLY flag without doubt.
But just a small question.
Just lines before error_trans tag, we're committing transaction and then
relocating system chunks.
In which we don't use goto error branch but returning directly.
Don't we need to to revert the RDONLY flag in that error handler?
Thanks,
Qu
---
fs/btrfs/volumes.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 0e8f16c305df..9d64700cc9b6 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2501,6 +2501,8 @@ int btrfs_init_new_device(struct btrfs_fs_info *fs_info,
const char *device_path
return ret;
error_trans:
+ if (seeding_dev)
+ sb->s_flags |= MS_RDONLY;
btrfs_end_transaction(trans);
rcu_string_free(device->name);
btrfs_sysfs_rm_device_link(fs_info->fs_devices, device);
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html