On 11/06/2013, at 16:00, David Sterba <[email protected]> wrote: > On Mon, Jun 10, 2013 at 09:07:55PM +0100, Filipe David Borba Manana wrote: >> --- a/disk-io.c >> +++ b/disk-io.c >> @@ -1267,12 +1267,12 @@ static int close_all_devices(struct btrfs_fs_info >> *fs_info) >> while (!list_empty(list)) { >> device = list_entry(list->next, struct btrfs_device, dev_list); >> list_del_init(&device->dev_list); >> - if (device->fd) { >> + if (device->fd > 0) { > >> - device = kmalloc(sizeof(*device), GFP_NOFS); >> + device = kzalloc(sizeof(*device), GFP_NOFS); >> if (!device) >> return -ENOMEM; >> - device->total_ios = 0; > > Can you please describe the incremental change between the two patches? > Why do you exclude fd == 0 ?
Sorry, I messed up my git send-email foo. I excluded 0 because the original code did it too, however it was logically incorrect. The last patch version (v2, 3rd email) does not exclude 0 and ensures that -1 is used everywhere as a marker for invalid fd. (Hopefully now I figured how to use git send-email to update a patch correctly) Thanks > > david -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
