Merge tag 'xfs-5.16-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 12 Dec 2021 00:21:06 +0000 (16:21 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 12 Dec 2021 00:21:06 +0000 (16:21 -0800)
commite034d9cbf9f17613c954541f65390be5c35807fc
tree479d22a987b25b15e01315f4aae2e627d50f6be0
parent8f97a35a53e2afc0a2485b2d976e12492563a318
parent089558bc7ba785c03815a49c89e28ad9b8de51f9
Merge tag 'xfs-5.16-fixes-3' of git://git./fs/xfs/xfs-linux

Pull xfs fix from Darrick Wong:
 "This fixes a race between a readonly remount process and other
  processes that hold a file IOLOCK on files that previously experienced
  copy on write, that could result in severe filesystem corruption if
  the filesystem is then remounted rw.

  I think this is fairly rare (since the only reliable reproducer I have
  that fits the second criteria is the experimental xfs_scrub program),
  but the race is clear, so we still need to fix this.

  Summary:

   - Fix a data corruption vector that can result from the ro remount
     process failing to clear all speculative preallocations from files
     and the rw remount process not noticing the incomplete cleanup"

* tag 'xfs-5.16-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  xfs: remove all COW fork extents when remounting readonly