On Tue, Mar 27, 2018 at 05:57:56PM +1100, Dave Chinner wrote: > */ > + smp_rmb(); > + if (!(sb->s_flags & SB_BORN)) > + return 0; > + > if (sb->s_op && sb->s_op->nr_cached_objects) > total_objects = sb->s_op->nr_cached_objects(sb, sc); > > @@ -1227,7 +1237,13 @@ mount_fs(struct file_system_type *type, int flags, const char *name, void *data) > sb = root->d_sb; > BUG_ON(!sb); > WARN_ON(!sb->s_bdi); > + > + /* > + * Write barrier is for super_cache_count() to ensure it does not run > + * until after the superblock is fully set up. > + */ > sb->s_flags |= SB_BORN; > + smp_wmb(); Umm... OK, I'm nearly asleep right now, but... shouldn't that be if (check ->s_flags) bugger off smp_rmb(); loads vs. stores smp_wmb(); store ->s_flags? IOW, your barriers seem to be in the wrong places... -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html