Re: [PATCH] Fix vmtruncate race and distributed filesystem race

From: Andrew Morton (
Date: Thu Jun 12 2003 - 16:44:18 EST

Dave McCracken <> wrote:
> --On Thursday, June 12, 2003 14:00:14 -0700 Andrew Morton <>
> wrote:
> > And this does require that ->nopage be entered with page_table_lock held,
> > and that it drop it.
> I think that's a worse layer violation than referencing inode in
> do_no_page. We shouldn't require that the filesystem layer mess with the
> page_table_lock.

Well it is not "worse". Futzing with i_sem in do_no_page() is pretty gross.
You could add vm_ops->prevalidate() or something if it worries you.

btw, it should be synchronising with
file->f_dentry->d_inode->i_mapping->host->i_sem, not
file->f_dentry->d_inode->i_sem. do_truncate() also seems to be taking the
(potentially) wrong semaphore.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sun Jun 15 2003 - 22:00:34 EST