On Mon, Jun 04, 2018 at 02:37:22PM +0200, Andreas Gruenbacher wrote: > @@ -2106,7 +2105,7 @@ int __generic_write_end(struct inode *inode, loff_t pos, unsigned copied, > * ordering of page lock and transaction start for journaling > * filesystems. > */ > - if (i_size_changed) > + if (dirty_inode) > mark_inode_dirty(inode); > return copied; Calling mark_inode_dirty on an already dirty inode is cheap, so how about just calling it directly in your caller that always wants to set the inode dirty?