Hi :) On Wed, Sep 28, 2011 at 06:56, Venkatram Tummala <venkatram867@xxxxxxxxx> wrote: > Hi All, > I have a simple device driver which creates a /dev/XYZ file. I need to > prevent a process from opening the file more than once. However, multiple > processes can open the file simultaneously. Is there any any elegant way to > do this other than checking all opened files in the process ? Uhm, keep a reference count and increment it on every file open in your module? How does that sound? -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com _______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies