Skip to contentSkip to conversation

Question about error handling for the function,disk_add_events in genhd.c

DISCUSSION Jens Axboe 1 participant 1 message Dec 22, 2014 1 message not in the archive

lore
Share & tools
lore

Jens Axboe

author
#1 lore raw
In reply to a message not in the archive
Quoted 9 lines · nick

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.

Signature · 1 line
Jens Axboe