From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f65.google.com ([209.85.214.65]:55808 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935606AbeFMOG4 (ORCPT ); Wed, 13 Jun 2018 10:06:56 -0400 MIME-Version: 1.0 References: <2b437c6f-3e10-3d83-bdf3-82075d3eaa1a@i-love.sakura.ne.jp> <3cf4b0e3-31b6-8cdc-7c1e-15ba575a7879@i-love.sakura.ne.jp> <20180611091248.2i6nt27h5mxrodm2@quack2.suse.cz> <20180611160131.GQ1351649@devbig577.frc2.facebook.com> <20180611162920.mwapvuqotvhkntt3@quack2.suse.cz> <20180611172053.GR1351649@devbig577.frc2.facebook.com> <20180612155754.x5k2yndh5t6wlmpy@quack2.suse.cz> In-Reply-To: From: Linus Torvalds Date: Wed, 13 Jun 2018 07:06:44 -0700 Message-ID: Subject: Re: [PATCH] bdi: Fix another oops in wb_workfn() To: Tetsuo Handa Cc: Jan Kara , Tejun Heo , Dmitry Vyukov , Jens Axboe , syzbot+4a7438e774b21ddd8eca@syzkaller.appspotmail.com, syzkaller-bugs@googlegroups.com, linux-fsdevel , Linux Kernel Mailing List , Al Viro , Dave Chinner , linux-block Content-Type: text/plain; charset="UTF-8" Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Jun 13, 2018 at 3:44 AM Tetsuo Handa wrote: > > Can't we utilize RCU grace period (like shown below) ? _Please_ don't do conditional locking. Particularly not the kind where then a function drops the lock that was taken in another function - and only does it based on some parameter. Yes, we have cases where we do it, but it's seldom a great idea, and it _really_ makes for subtle code (and subtle bugs). Linus