lkml.org 
[lkml]   [2014]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Question about error handling for the function,disk_add_events in genhd.c
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



\
 
 \ /
  Last update: 2014-12-22 18:41    [W:1.214 / U:1.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site