block: don't rely on BLK_OPEN_RESTRICT_WRITES when yielding write access

Make it possible to detected a block device that was opened with
restricted write access based only on BLK_OPEN_WRITE and
bdev->bd_writers < 0 so we won't have to claim another FMODE_* flag.

Link: https://lore.kernel.org/r/20240123-vfs-bdev-file-v2-31-adbd023e19cc@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
Christian Brauner 2024-01-23 14:26:48 +01:00
commit 321de651fa
No known key found for this signature in database
GPG key ID: 91C61BC06578DCA2