Re: [PATCH 1/5 v2] Btrfs-progs: fix closing of devices

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

 



On Fri, Jun 21, 2013 at 5:11 PM, Liu Bo <bo.li.liu@xxxxxxxxxx> wrote:
>> --- a/volumes.c
>> +++ b/volumes.c
>> @@ -116,6 +116,7 @@ static int device_list_add(const char *path,
>>                       /* we can safely leave the fs_devices entry around */
>>                       return -ENOMEM;
>>               }
>> +             device->fd = -1;
>
> One nit here,
> I think it's ok without this since if we get the right device->name, it
> means this device is not missing and its fd will be valid.

Good point.
Only reason I left it like that, is because besides being more clear
(subjective) there seems to be possible to have device.name as
non-null but no valid fd - i.e. the open() call in
volumes.c:btrfs_open_devices() failed.

thanks


>
> thanks,
> liubo
--
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