On Wed 20-03-13 09:37:51, Ted Tso wrote: > On Wed, Mar 20, 2013 at 02:22:23PM +0100, Jan Kara wrote: > > > + if (work_pending(&EXT4_I(inode)->i_unwritten_work)) > > > + flush_work(&EXT4_I(inode)->i_unwritten_work); > > > } > > Won't it be more logical to use cancel_work_sync() here? > > Hmm.... yes, probably, but then ext4_ioend_wait() can only be safely > used by ext4_evict_inode(). I'll make the change, but I'll also make > a comment to this effect. (No one else is using it now, but if there > was ever a need to use it while the inode was in use, using > cancel_work_sync() would be highly dagernous/racy. That being said, I > can't really think of a good use case other than evict_inode path, so > it seems fine to make this change.) Yeah, we can possibly rename the function or maybe even just inline it in ext4_evict_inode? Honza -- Jan Kara <jack@xxxxxxx> SUSE Labs, CR -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html