Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2050559imu; Fri, 23 Nov 2018 04:04:15 -0800 (PST) X-Google-Smtp-Source: AFSGD/Xc+64CCucMRTq8uEiAq2lWKoAYel72msfYre4f+YY7aaNt6zdymK3c+Es9gL5JX39toNmZ X-Received: by 2002:a17:902:b494:: with SMTP id y20mr13763316plr.178.1542974655851; Fri, 23 Nov 2018 04:04:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542974655; cv=none; d=google.com; s=arc-20160816; b=waUyESYkgP0Rv0nG0BVopZ1l9GRB9A1bi35wrbqjZjVPE8mTC+9ppptUSbfEFRzHJR 3dSiBYcoGX+/h/PUd527MyLw3bpxJUQF8yEZTPqB+3h7QO+lxUTAwXVs9LF7sjz7vNpH j9UsXwuMMEiZ/fz6lMMSGGw1UGacP6iv1LNzfRCD/xMsWACSb4PYUea7Ljm7Zl9xEiGe DiIidm/6XZjnJeMmOksB+KhGqGOGlbli6NcH4pYGLDoaqAbj07RWNreRxHMCDxla5dfg B8uqNRzlPqzNHLFYwlFUZ+mbrTxJb1AK7Nq3c8nZgPqkGVUZuXA69zj7iPRFQH5Aj2Nm JI9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Myr3y6XK6zp9wPf1LKFusuHyU7mD6Lye7pGJvzD9tnI=; b=rN42orO5abfsVwtVnzfFeKjT+574rFhLaKgjHJedL4Im5LGbjEx7I6a0EFjTeYevgv 83LL+9iSH9VV041CvXbKzZYkcQEnc/U/c3xF6Y5aXehwz9sJ4ijIR0fWWqvTe0KU9M5X iRjY2Pb8F925EwWusvRXdoNNSj44Fb9gWie7sPz36C2kEipthbA5FEWpo+lekCgejZ2X ywa5xINUiHNnb2j8iRq78P/LgoBAsKLnF2KLtP9YM+zGe7F1gxt1lVsG2GaG50/rV4Kx 6LAW/lYrLvtrVLrcHi5oWQ+6wfwVL0sJ4dwjQYokdzZJAomlkJT2wucWnsvlnieFWAC9 uUTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TjCMMxzU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j191si52952189pgc.15.2018.11.23.04.03.48; Fri, 23 Nov 2018 04:04:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TjCMMxzU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394496AbeKVVn5 (ORCPT + 99 others); Thu, 22 Nov 2018 16:43:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:41848 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388478AbeKVVn5 (ORCPT ); Thu, 22 Nov 2018 16:43:57 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E755320820; Thu, 22 Nov 2018 11:05:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542884703; bh=LEOnr9wkHOC0x+X9N6qk5scbIFuXanQsINY/tt8oPT8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TjCMMxzUFSRNGffTqz+yv5awLPzDZgGHQD1wjWhzvmtb9MzxGodHd618CnkLv3kD2 2VZym8f63cUh67LYTlEHEDKVQKpqAZXHu++vXmXOAFGmCnFYk1XcqyvQk3Oz/MKSZ1 sVN+XccSSBgaTeBoRqe8/zC//W6edfOtU0rmQ/lA= Date: Thu, 22 Nov 2018 12:05:00 +0100 From: Greg Kroah-Hartman To: Gao Xiang Cc: devel@driverdev.osuosl.org, linux-erofs@lists.ozlabs.org, Chao Yu , LKML , weidu.du@huawei.com, Miao Xie Subject: Re: [PATCH 07/10] staging: erofs: separate into init_once / always Message-ID: <20181122110500.GC5287@kroah.com> References: <20181120143425.43637-1-gaoxiang25@huawei.com> <20181120143425.43637-8-gaoxiang25@huawei.com> <20181122102339.GG3189@kroah.com> <66b90226-5d0e-7344-5220-908aa243b014@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <66b90226-5d0e-7344-5220-908aa243b014@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 22, 2018 at 06:34:10PM +0800, Gao Xiang wrote: > Hi Greg, > > On 2018/11/22 18:23, Greg Kroah-Hartman wrote: > >> + > >> + DBG_BUGON(work->nr_pages); > >> + DBG_BUGON(work->vcnt); > > How can these ever be triggered? I understand the need for debugging > > code when you are writing code, but at this point it shouldn't be needed > > anymore, right? > > I need to avoid some fields is not 0 when the new workgroup is created (because > work->nr_pages and work->vcnt == 0 usually after the previous workgroup is freed). > But that is not obvious, it is promised by the current logic. Then delete these lines if they can never happen :) > In order to not introduce such a issue in the future, or there are some potential > race (work->nr_pages and work->vcnt != 0 when the previous workgroup == 0), it need > to be noticed to developpers as early as possible. Then make it a real call, do not wrap it in odd macros that do not really explain why it is "debugging only". Your code is "real" now, make the logic real for all developers and users. thanks, greg k-h