Re: [PATCH 4/6] btrfs: make btrfs_free_stale_device() argument optional

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

 




On 16.12.2017 04:14, Anand Jain wrote:
>         /*
>>> @@ -637,8 +632,11 @@ static void btrfs_free_stale_device(struct
>>> btrfs_device *cur_dev)
>>>                * either use mapper or non mapper path throughout.
>>>                */
>>>               rcu_read_lock();
>>> -            not_found = strcmp(rcu_str_deref(dev->name),
>>> -                        rcu_str_deref(cur_dev->name));
>>> +            if (cur_dev)
>>> +                not_found = strcmp(rcu_str_deref(dev->name),
>>> +                           rcu_str_deref(cur_dev->name));
>>> +            else
>>> +                not_found = 0;
>>
>> nit: Perhaps put a proper documentation header at the beginning of the
>> function detailing this behavior. I.e.
>>
>> /*
>>   * btrfs_free_stale_device
>>   * ....
>>
> 
>  Right. Will add.

I posted this comment before reading your other patches, having done
that I'd say it's best to add the documentation once all the cleanups
have been done, since you also add another semantics with the "path"
argument.


> 
> Thanks, Anand
> 
> 
--
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