RE: [PATCH v2 02/13] exfat: add super block operations

From: Namjae Jeon
Date: Tue Nov 19 2019 - 04:22:35 EST



> Hi,
Hi,
>
> On Tue, Nov 19, 2019 at 02:10:56AM -0500, Namjae Jeon wrote:
> > +static void exfat_put_super(struct super_block *sb)
> > +{
> > + struct exfat_sb_info *sbi = EXFAT_SB(sb);
> > +
> > + mutex_lock(&sbi->s_lock);
> > + if (READ_ONCE(sbi->s_dirt)) {
> > + WRITE_ONCE(sbi->s_dirt, true);
>
> No idea what the code does. But I was just skimming over and find the
> above pattern somehow strange. Shouldn't this be something like
Right.

>
> if (!READ_ONCE(sbi->s_dirt)) {
> WRITE_ONCE(sbi->s_dirt, true);

It should be :
if (READ_ONCE(sbi->s_dirt)) {
WRITE_ONCE(sbi->s_dirt, false);
I will fix it on v3.
Thanks for review!
>
> ?
>
> Thanks,
> Daniel