From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755155AbcFTUqR (ORCPT ); Mon, 20 Jun 2016 16:46:17 -0400 Received: from mail-yw0-f193.google.com ([209.85.161.193]:35714 "EHLO mail-yw0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752058AbcFTUqH (ORCPT ); Mon, 20 Jun 2016 16:46:07 -0400 Date: Mon, 20 Jun 2016 16:27:39 -0400 From: Tejun Heo To: Petr Mladek Cc: Andrew Morton , Oleg Nesterov , Ingo Molnar , Peter Zijlstra , Steven Rostedt , "Paul E. McKenney" , Josh Triplett , Thomas Gleixner , Linus Torvalds , Jiri Kosina , Borislav Petkov , Michal Hocko , linux-mm@kvack.org, Vlastimil Babka , linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v9 10/12] kthread: Allow to cancel kthread work Message-ID: <20160620202739.GB3262@mtj.duckdns.org> References: <1466075851-24013-1-git-send-email-pmladek@suse.com> <1466075851-24013-11-git-send-email-pmladek@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1466075851-24013-11-git-send-email-pmladek@suse.com> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 16, 2016 at 01:17:29PM +0200, Petr Mladek wrote: > +/* > + * Returns true when the work could not be queued at the moment. > + * It happens when it is already pending in a worker list > + * or when it is being cancelled. > + * > + * This function must be called under work->worker->lock. Replace the comment with a lockdep assertion? > + */ > +static inline bool queuing_blocked(const struct kthread_work *work) > +{ > + return !list_empty(&work->node) || work->canceling; > +} Other than that, Acked-by: Tejun Heo Thanks. -- tejun From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCH v9 10/12] kthread: Allow to cancel kthread work Date: Mon, 20 Jun 2016 16:27:39 -0400 Message-ID: <20160620202739.GB3262@mtj.duckdns.org> References: <1466075851-24013-1-git-send-email-pmladek@suse.com> <1466075851-24013-11-git-send-email-pmladek@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1466075851-24013-11-git-send-email-pmladek@suse.com> Sender: owner-linux-mm@kvack.org To: Petr Mladek Cc: Andrew Morton , Oleg Nesterov , Ingo Molnar , Peter Zijlstra , Steven Rostedt , "Paul E. McKenney" , Josh Triplett , Thomas Gleixner , Linus Torvalds , Jiri Kosina , Borislav Petkov , Michal Hocko , linux-mm@kvack.org, Vlastimil Babka , linux-api@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: linux-api@vger.kernel.org On Thu, Jun 16, 2016 at 01:17:29PM +0200, Petr Mladek wrote: > +/* > + * Returns true when the work could not be queued at the moment. > + * It happens when it is already pending in a worker list > + * or when it is being cancelled. > + * > + * This function must be called under work->worker->lock. Replace the comment with a lockdep assertion? > + */ > +static inline bool queuing_blocked(const struct kthread_work *work) > +{ > + return !list_empty(&work->node) || work->canceling; > +} Other than that, Acked-by: Tejun Heo Thanks. -- tejun -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org