Re: Question about error handling for the function,disk_add_events in genhd.c
From: Jens Axboe
Date: Mon Dec 22 2014 - 12:32:44 EST
On 12/22/2014 10:28 AM, nick wrote:
Greetings Again Jen,
I am wondering about the fix me message here:
/* FIXME: error handling */
related to error handling. Seems the below code:
if (sysfs_create_files(&disk_to_dev(disk)->kobj, disk_events_attrs) < 0)
pr_warn("%s: failed to create sysfs files for events\n",
disk->disk_name);
handles this fine. I am going to remove the comment unless we need to
rewrite this function.
Again, spewing a warning when the error triggers and marching is not
"handles this fine", it only qualifies as "doesn't blatantly ignore an
error". Please spend some time studying up on what error handling is,
I'm not even going to look at potential patches or further musings on
this topic until you have done that.
--
Jens Axboe
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/