Message ID | 166801781202.3992140.14867094485108244588.stgit@magnolia (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | xfs, iomap: fix data corruption due to stale cached iomaps | expand |
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c index c3c23524a3d2..5e746df2c63f 100644 --- a/fs/xfs/xfs_iomap.c +++ b/fs/xfs/xfs_iomap.c @@ -1370,6 +1370,9 @@ xfs_buffered_write_iomap_valid( if (ibc->data_seq != READ_ONCE(ip->i_df.if_seq)) return false; + if (ibc->has_cow_seq && + ibc->cow_seq != READ_ONCE(ip->i_cowfp->if_seq)) + return false; return true; }