yes, the above code is a bit of a waste of space :)
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.
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.
mark_inode_dirty() is the only way in which those bits can get
set. So the risk we face is that someone calls mark_inode_dirty(),
then alters the inode, then there is a call to write_inode().
That would be a bug, IMO.
As for knfsd, well, someone must have called mark_inode_dirty()
at sometime, else they'd never get written.
It's all rather dodgy.
-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/