lkml.org 
[lkml]   [2006]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectproblem with duplicate sysfs directories and files
Hi,

I spent some time tonight trying to track down how to fix the issue of
duplicate sysfs files and/or directories. This happens when you try to
create a kobject with the same name in the same directory. The creation
of the second kobject will fail, but the directory will remain in sysfs.

Now I know this isn't a normal operation, but it would be good to fix
this eventually. I traced the issue down to fs/sysfs/dir.c:create_dir()
and the check for:
if (error && (error != -EEXIST)) {

Problem is, error is set to -EEXIST, so we don't clean up properly. Now
I know we can't just not check for this, as if you do that error
cleanup, the original kobject's sysfs entry gets very messed up (ls -l
does not like it at all...)

But I can't seem to figure out what exactly we need to do to clean up
properly here.

Do you, or anyone else, have any pointers or ideas?

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-08 08:56    [W:0.067 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site