btrfs:Fix error handling in the function btrfs_dev_replace_kthread
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 24 lines · Nicholas Krause
This fixes error handling in the function
btrfs_dev_replace_kthreadby checking if the call to the functionbtrfs_dev_replace_continue_on_mounthas failed and if so return the error code to this function's caller in order to signal a failure has occurred when calling this particular function.Signed-off-by Nicholas Krause <[email protected]>--- fs/btrfs/dev-replace.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)fs/btrfs/dev-replace.c +1
-0@@ -803,6 +803,7 @@ static int btrfs_dev_replace_kthread(void *data)struct btrfs_dev_replace *dev_replace = &fs_info->dev_replace;struct btrfs_ioctl_dev_replace_args *status_args;u64 progress; +int ret; status_args =kzalloc (sizeof (*status_args),GFP_NOFS );if (status_args) {
fs/btrfs/dev-replace.c static int btrfs_dev_replace_kthread(void *data) · line 827
Quoted 8 lines
fs/btrfs/dev-replace.c +3
-1@@ -820,7 +821,9 @@ static int btrfs_dev_replace_kthread(void *data)"<missing target disk>" , (unsigned int)progress); } -btrfs_dev_replace_continue_on_mount (fs_info); + ret =btrfs_dev_replace_continue_on_mount (fs_info); +if (ret) +return ret;atomic_set (&fs_info->mutually_exclusive_operation_running,0 );
This atomic_set that you're skipping is really important.
-chris