On Thu, Oct 03, 2024 at 08:09:32AM -0700, Darrick J. Wong wrote: > From: Darrick J. Wong <djwong@xxxxxxxxxx> > > Remove the code in dax_unshare_iter that zeroes the destination memory > because it's not necessary. > > If srcmap is unwritten, we don't have to do anything because that > unwritten extent came from the regular file mapping, and unwritten > extents cannot be shared. The same applies to holes. > > Furthermore, zeroing to unshare a mapping is just plain wrong because > unsharing means copy on write, and we should be copying data. > > This is effectively a revert of commit 13dd4e04625f ("fsdax: unshare: > zero destination if srcmap is HOLE or UNWRITTEN") The original commit claims it fixed a bug, so I'm curious how that happend and got fixed differently now. But manually zeroing data on an unshare does seem very wrong to me: Reviewed-by: Christoph Hellwig <hch@xxxxxx>