Re: [PATCH v2 31/34] block: use file->f_op to indicate restricted writes^[

Christoph Hellwig
2024-01-30T08:32:16Z

On Mon, Jan 29, 2024 at 06:09:37PM +0100, Christian Brauner wrote:
> I don't think it's that bad and is temporary until we can
> unconditionally disable writing to mounted block devices. Until then we
> can place all of this under #if IS_ENABLED(CONFIG_BLK_DEV_WRITE_MOUNTED)
> in a single location in block/fops.c so its nicely encapsulated and
> confined.

Oh well. If Jens is fine with this I can live with it even if I don't
like it too much. I'll probably just clean it up as a follow up.

OTOH I fear we won't be able to unconditionally disable writing to
mounted block devices anytime soon if ever.