lkml.org 
[lkml]   [1998]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Are file_operations.{open,release} serialized?
From
Date
Mike Kilburn <mike@conexio.co.za> writes:

> > that card. I want to ask you if it is safe to increment this
> > counter in the device's file_operations.open() routine and to decrement
> > in the file_operations.release() routine without any locking
>
> I use atomic_inc and atomic_dec for this sort of thing. Dont forget about
> SMP systems.

sys_open() calls lock_kernel() around file_operations.open(). I'm
told that all of the filesystem operations are (though I think this
person's expertise lies in squid rather than kernel hacking).

pjm.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:42    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site