On Sun, Oct 17, 2010 at 07:39:00PM -0400, Christoph Hellwig wrote: > Does anyone remember why we call invalidate_inode_buffers in > invalidate_list? These days we basically call invalidate_inode_buffers > only in ->evict_inode, which we will call from invalidate_list in > case of a zero refcount. > > For calls to invalidate_inode_buffers it's hamrless, but for other > callers it means we lose track of which buffers were dirtied for > an inode, and thus can write them out during fsync. > > Something like the untested patch below should fix it. Seems reasonable to me. I can't see any obvious reason why the call in evict_inode in not sufficient to ensure the inode is correctly cleaned up, and none of the inode buffers take a reference to the inode so they shouldn't need to be invalidated to get the reference count to zero.... > While we're > at it - any reaso not to consider I_NEW inodes as busy in > invalidate_list? Not that I can think of. I'd probably leave the WARN_ON() condition there, though, so that if we do ever encounter them we hear about it... Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html