On 9/3/20 9:22 PM, Ming Lei wrote: > It is one MD's bug, and percpu_ref_exit() may be called on one ref not > initialized via percpu_ref_init(), and the following patch can fix the > issue: I really (REALLY) think this should be handled by percpu_ref_exit(), if it worked before. Otherwise you're just setting yourself up for a world of pain with other users, and we'll be fixing this fallout for a while. I don't want to carry that. So let's just make it do the right thing, needing to do this: > + if (mddev->writes_pending.percpu_count_ptr) > + percpu_ref_exit(&mddev->writes_pending); is really nasty. -- Jens Axboe