On Tue, Jul 17, 2018 at 01:08:34AM +0000, Gu, Jinxiang wrote:
> > > - device = device_list_add(path, disk_super, &new_device_added);
> > > - if (IS_ERR(device)) {
> > > - ret = PTR_ERR(device);
> > > - } else {
> > > - *fs_devices_ret = device->fs_devices;
> > > - if (new_device_added)
> > > - btrfs_free_stale_devices(path, device);
> > > - }
> > > + ret = device_list_add(path, disk_super, &new_device_added);
> > > + if (new_device_added)
> > > + btrfs_free_stale_devices(path, ret);
> >
> > Why is this skipping the error handling? I've resolved the conflict in a
> > different way in misc-next, have you had a look there?
>
> Since when new_device_added set to be true, the return value of device_list_add
> must not a error value.
Yeah, but this is not obvious from the context and looks like "
device_list_add fails but we'll do something anyway", so I'm for keeping
the check.
> So, I think no necessary to add the judge.
--
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