Re: [PATCH v2] exfat: check disk status during buffer write

From: Christoph Hellwig
Date: Wed Jul 24 2024 - 09:07:18 EST


> +static int exfat_block_device_ejected(struct super_block *sb)
> +{
> + struct backing_dev_info *bdi = sb->s_bdi;
> +
> + return bdi->dev == NULL;
> +}

NAK, file systems have no business looking at this. What you probably
really want is to implement the ->shutdown method for exfat so it gets
called on device removal.