On Mon 21-08-23 17:56:07, Christian Brauner wrote: > > I think we misunderstood here. I believe we need: > > > > /* > > * Pairs with smp_load_acquire() in super_lock() to make sure > > * all initializations in the superblock are seen by the user > > * seeing SB_BORN sent. > > */ > > smp_store_release(&sb->s_flags, sb->s_flags | flag); > > /* > > * Pairs with the barrier in prepare_to_wait_event() to make sure > > * ___wait_var_event() either sees SB_BORN set or > > * waitqueue_active() check in wake_up_var() sees the waiter > > */ > > smp_rmb(); > > wake_up_var(&sb->s_flags); > > Oh right, sorry I missed this. > > > Maybe we can have in these places rather: > > > > if (!super_lock_excl(sb)) > > WARN(1, "Dying superblock while freezing!"); > > > > So that we reduce the amount of __super_lock_excl() calls which are kind of > > special. In these places we hold active reference so practically this is > > equivalent. Just a though, pick whatever you find better, I don't have a > > strong opinion but wanted to share this idea. > > Ok, will pick yours. > > Do you want me to resend? No need to resend as far as I'm concerned - and my suggestion was subtly wrong as well - see my other email. Honza -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR