> > 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