accessing files from kernel space ???

From: BenHanokh Gabriel (gabriel@SANgate.com)
Date: Wed May 17 2000 - 03:38:28 EST


hi

can i open and write files from a module or that i must do it from user
space ?
i.e. split my module into 2 parts one in user space opening and writing
to files then it calls the module to do the rest of the job.

open:
-----
filp_open looks right, but i saw that locks are accuried before
accessing it( e.g. sys_open ).
do i need to lock anything before i open the file ?
do i need to do anything with fds or that they only impotent for user
space apps?

write:
-----
should i call filp->f_op->write ?
and if so do i need to take care for any locking first( inode ? kernel ?
)

please CC me for any respond

THX
/gaby

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:12 EST