From: "Andrea Arcangeli" <andrea@suse.de>
>
> Because it's not necessary as far I can tell. Only one
> truncate_inode_pages() can run at once and none read or write can run
> under truncate_inode_pages(). This should be enforced by the VFS, and if
> that doesn't happen the truncate_inode_pages changes that gone into pre6
> (and following) hides the real bug.
>
truncate: VFS acquires inode->i_sem semaphore.[fs/open.c, do_truncate()]
write: VFS doesn't acquire the semaphore [new in 2.3], but f_op->write()
could acquire the semaphore.
e.g. generic_file_write() acquires the semaphore. [mm/filemap.c]
read: no locking. AFAICS read & truncate could run in parallel.
[I'm reading 2.3.99-pre6]
-- Manfred- 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 : Sun May 07 2000 - 21:00:15 EST