lkml.org 
[lkml]   [2004]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Inconsistency in sysfs behavior?
On Wed, 7 Jan 2004, Greg KH wrote:

> Because it is very difficult to determine when a user goes into a
> directory because we are using the ramfs/libfs code. It also does not
> cause any errors if the kobject is removed, as the vfs cleans up
> properly.
>
> Only when a file is opened does a kobject need to be pinned, due to
> possible errors that could happen.

I had in mind approaching this the opposite way. Instead of trying to
make open directories also pin a kobject, why not make open attribute
files not pin them?

It shouldn't be hard to avoid any errors; in fact I had a patch from some
time ago that would do the trick (although in a hacked-up kind of way).
The main idea is to return -ENXIO instead of calling the show()/store()
routines once the attribute has been removed.

Alan Stern

-
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: 2005-03-22 13:59    [W:0.104 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site