Christian Brauner 59a55a63c2
fs,block: get holder during claim
Now that we open block devices as files we need to deal with the
realities that closing is a deferred operation. An operation on the
block device such as e.g., freeze, thaw, or removal that runs
concurrently with umount, tries to acquire a stable reference on the
holder. The holder might already be gone though. Make that reliable by
grabbing a passive reference to the holder during bdev_open() and
releasing it during bdev_release().

Fixes: f3a608827d1f ("bdev: open block device as files") # mainline only
Reported-by: Christoph Hellwig <hch@infradead.org>
Link: https://lore.kernel.org/r/ZfEQQ9jZZVes0WCZ@infradead.org
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
Tested-by: Yi Zhang <yi.zhang@redhat.com>
Reported-by: https://lore.kernel.org/r/CAHj4cs8tbDwKRwfS1=DmooP73ysM__xAb2PQc6XsAmWR+VuYmg@mail.gmail.com
Link: https://lore.kernel.org/r/20240315-freibad-annehmbar-ca68c375af91@brauner
Signed-off-by: Christian Brauner <brauner@kernel.org>
2024-03-18 10:32:44 +01:00
..
2024-01-11 20:11:35 -08:00
2024-03-11 10:52:34 -07:00
2024-03-12 12:28:34 -07:00
2024-02-25 12:05:21 +01:00
2024-03-12 13:17:36 -07:00
\n
2024-03-13 14:30:58 -07:00
\n
2024-03-13 14:30:58 -07:00
\n
2024-03-13 14:30:58 -07:00
2024-03-11 10:37:45 -07:00
2023-12-29 11:58:34 -08:00
2024-03-11 09:38:17 -07:00
2024-03-11 09:38:17 -07:00
2024-03-04 18:35:21 +01:00
\n
2024-03-13 14:30:58 -07:00
2024-02-08 21:19:59 +01:00
2024-03-12 14:27:37 -07:00
2024-03-12 20:03:34 -07:00
\n
2024-03-13 14:30:58 -07:00
2024-03-11 09:38:17 -07:00
\n
2024-03-13 14:30:58 -07:00
2024-03-11 10:52:34 -07:00
2024-03-13 13:15:24 -07:00
2024-03-12 17:44:08 -07:00
2024-03-13 13:52:24 -07:00
2024-03-12 20:03:34 -07:00
2024-03-11 10:07:03 -07:00
2024-03-06 10:52:12 +01:00
2024-03-11 09:38:17 -07:00
2024-03-12 17:44:08 -07:00
2024-03-12 14:45:12 -07:00
2024-03-11 10:07:03 -07:00
2024-03-12 20:03:34 -07:00
2023-12-12 14:24:14 +01:00
2024-03-11 10:07:03 -07:00
2024-03-13 12:53:53 -07:00
2024-02-12 13:13:59 +01:00
2024-03-13 12:53:53 -07:00
2024-03-13 12:53:53 -07:00
2024-03-11 10:21:06 -07:00
2024-03-12 20:03:34 -07:00
2024-03-13 12:53:53 -07:00
2024-03-12 20:03:34 -07:00
2024-03-13 12:53:53 -07:00
2024-02-02 13:11:49 +01:00
2024-03-12 20:03:34 -07:00
2024-01-08 10:57:34 -08:00
2024-03-18 10:32:44 +01:00
2024-01-17 13:03:37 -08:00
2024-02-15 23:43:47 -05:00