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

From: Sungjong Seo
Date: Thu Jul 25 2024 - 02:01:08 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.

Oh! Thank you for your additional comments. I completely missed this part.
I agree with what you said. Implementing ->shutdown seems to be the
right decision.