mbox series

[GIT,PULL] vfs fixes

Message ID 20240405-vfs-fixes-3b957d5fde0f@brauner (mailing list archive)
State New, archived
Headers show
Series [GIT,PULL] vfs fixes | expand

Pull-request

git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.9-rc3.fixes

Message

Christian Brauner April 5, 2024, 11:22 a.m. UTC
Hey Linus,

/* Summary */
This contains a few small fixes. This comes with some delay because I
wanted to wait on people running their reproducers and the Easter
Holidays meant that those replies came in a little later than usual:

* Fix handling of preventing writes to mounted block devices.

  Since last kernel we allow to prevent writing to mounted block devices
  provided CONFIG_BLK_DEV_WRITE_MOUNTED isn't set and the block device
  is opened with restricted writes. When we switched to opening block
  devices as files we altered the mechanism by which we recognize when a
  block device has been opened with write restrictions. The detection
  logic assumed that only read-write mounted filesystems would apply
  write restrictions to their block devices from other openers. That of
  course is not true since it also makes sense to apply write
  restrictions for filesystems that are read-only.

  Fix the detection logic using an FMODE_* bit. We still have a few left
  since we freed up a couple a while ago. I also picked up a patch to
  free up four additional FMODE_* bits scheduled for the next merge window.

* Fix counting the number of writers to a block device. This just
  changes the logic to be consistent.

* Fix a bug in aio causing a NULL pointer derefernce after we
  implemented batched processing in aio.

* Finally, add the changes we discussed that allows to yield block
  devices early even though file closing itself is deferred. This also
  allows us to remove two holder operations to get and release the
  holder to align lifetime of file and holder of the block device.

/* Testing */
clang: Debian clang version 16.0.6 (19)
gcc: (Debian 13.2.0-7) 13.2.0

All patches are based on v6.9-rc1 and have been sitting in linux-next.
No build failures or warnings were observed.

/* Conflicts */
No known conflicts.

The following changes since commit 4cece764965020c22cff7665b18a012006359095:

  Linux 6.9-rc1 (2024-03-24 14:10:05 -0700)

are available in the Git repository at:

  git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.9-rc3.fixes

for you to fetch changes up to caeb4b0a11b3393e43f7fa8e0a5a18462acc66bd:

  aio: Fix null ptr deref in aio_complete() wakeup (2024-04-05 11:20:28 +0200)

Please consider pulling these changes from the signed vfs-6.9-rc3.fixes tag.

Thanks!
Christian

----------------------------------------------------------------
vfs-6.9-rc3.fixes

----------------------------------------------------------------
Christian Brauner (3):
      block: handle BLK_OPEN_RESTRICT_WRITES correctly
      block: count BLK_OPEN_RESTRICT_WRITES openers
      fs,block: yield devices early

Kent Overstreet (1):
      aio: Fix null ptr deref in aio_complete() wakeup

 block/bdev.c                    | 84 ++++++++++++++++++++++++++++++++---------
 drivers/mtd/devices/block2mtd.c |  2 +-
 fs/aio.c                        |  2 +-
 fs/bcachefs/super-io.c          |  2 +-
 fs/cramfs/inode.c               |  2 +-
 fs/ext4/super.c                 |  8 ++--
 fs/f2fs/super.c                 |  2 +-
 fs/jfs/jfs_logmgr.c             |  4 +-
 fs/reiserfs/journal.c           |  2 +-
 fs/romfs/super.c                |  2 +-
 fs/super.c                      | 24 ++----------
 fs/xfs/xfs_buf.c                |  2 +-
 fs/xfs/xfs_super.c              |  6 +--
 include/linux/blkdev.h          | 11 +-----
 include/linux/fs.h              |  2 +
 15 files changed, 89 insertions(+), 66 deletions(-)

Comments

pr-tracker-bot@kernel.org April 5, 2024, 5:09 p.m. UTC | #1
The pull request you sent on Fri,  5 Apr 2024 13:22:56 +0200:

> git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.9-rc3.fixes

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/fae02687777ad80c1299c684f7f814c542103fa6

Thank you!