Re: [PATCH] btrfs: return original error code when failing from option parsing

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

 




On 2018年05月10日 08:34, Qu Wenruo wrote:
> 
> 
> On 2018年05月09日 21:08, Chengguang Xu wrote:
>> It's no good to overwrite -ENOMEM using -EINVAL when failing
>> from mount option parsing, so just return original error code.
>>
>> Signed-off-by: Chengguang Xu <cgxu519@xxxxxxx>
> 
> Reviewed-by: Qu Wenruo <wqu@xxxxxxxx>
> 
> Thanks,
> Qu
> 
>> ---
>>  fs/btrfs/super.c | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
>> index 0628092..ae6447d 100644
>> --- a/fs/btrfs/super.c
>> +++ b/fs/btrfs/super.c
>> @@ -1783,7 +1783,6 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data)
>>  
>>  	ret = btrfs_parse_options(fs_info, data, *flags);
>>  	if (ret) {
>> -		ret = -EINVAL;
>>  		goto restore;
>>  	}

Just a small nitpick, for single line branch, the bracket should be
removed according to code style.

Thanks,
Qu

>>  
>>
> 

Attachment: signature.asc
Description: OpenPGP digital signature


[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