lkml.org 
[lkml]   [2020]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 5/5] block: revert back to synchronous request_queue removal
    On Tue, Apr 14, 2020 at 11:46:44PM -0700, Christoph Hellwig wrote:
    > On Tue, Apr 14, 2020 at 08:58:52PM +0000, Luis Chamberlain wrote:
    > > > I think this needs a WARN_ON thrown in to enforece the calling context.
    > >
    > > I considered adding a might_sleep() but upon review with Bart, he noted
    > > that this function already has a mutex_lock(), and if you look under the
    > > hood of mutex_lock(), it has a might_sleep() at the very top. The
    > > warning then is implicit.
    >
    > It might just be a personal preference, but I think the documentation
    > value of a WARN_ON_ONCE or might_sleep with a comment at the top of
    > the function is much higher than a blurb in a long kerneldoc text and
    > a later mutex_lock.

    Well I'm a fan of making this explicit, so sure will just sprinkle a
    might_sleep(), even though we have a mutex_lock().

    Luis

    \
     
     \ /
      Last update: 2020-04-15 15:21    [W:3.198 / U:0.104 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site