Re: VM deadlock

From: Chris Mason (
Date: Thu Jun 28 2001 - 09:25:17 EST

On Friday, June 29, 2001 12:08:37 AM +1000 Andrew Morton
<> wrote:

> The reason ->write_inode() can be a no-op is that __sync_one()
> marks the inode clean, then calls ->write_inode(). We *know*
> that we took a copy of the inode in mark_inode_dirty(), so
> we don't need to do anything.

Yes, the only exception is that write_inode needs to honor the sync flag,
at least when not called under PF_MEMALLOC. The biggest reason I can find
so far is knfsd, who calls write_inode_now and expects the inode to be
securely on disk. It doesn't call mark_inode_dirty directly, it calls some
FS func (link, create, whatever) and then uses write_inode_now to commit.

> Of course this absolutely requires all inode dirtiers to
> call mark_inode_dirty() after doing the dirty, which is a risk.
> But we face that risk with the PF_MEMALLOC case anyway. No
> problems have appeared in testing.

I haven't seen any problems caused by it yet, but that might be because
reiserfs does all the important inode writes on its own. I believe
generic_commit_write is the only place outside the FS that calls
mark_inode_dirty with something other than an atime update.


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 : Sat Jun 30 2001 - 21:00:19 EST