Amit Kapoor wrote: > > Hi, > > I am having a weird problem writing to a file from the kernel. At the > statement ' file->f_op->write(...)' the module just seems to hang during > insmod. Could anyone tell me why this might be the case? The code is > pasted below. > > ... > inode = file->f_dentry->d_inode; > down(&inode->i_sem); > You shouldn't take i_sem here. see generic_file_write(). - -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ IRC Channel: irc.openprojects.net / #kernelnewbies Web Page: http://www.kernelnewbies.org/