On Wednesday 02 June 2004 01:20 am, Guillaume Thouvenin wrote: > I implemented the ioctl as follow: > > int my_ioctl(...) { > ... > switch(cmd) { > case REMOVE_AN_ITEM: > spin_lock_irq(&my_lock); > update_my_structure(); > spin_unlock_irq(&my_lock); > break; > .... > } > } > It your structure accessed form an interrupt/tasklet? If not semaphore is more appropriate. That's ignoring the fact that whole idea of dumping anything onto a file system from kernel is messy IMHO. -- Dmitry -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/