Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2007943imu; Fri, 23 Nov 2018 03:27:25 -0800 (PST) X-Google-Smtp-Source: AFSGD/XNJd15WTfFnNU0fIIBGZLdoBt6A1XWuh5cxDRnzt/Pc/uxl00eYYe/xq6BDcFTyhCOXimP X-Received: by 2002:a63:9749:: with SMTP id d9mr13374797pgo.415.1542972445628; Fri, 23 Nov 2018 03:27:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542972445; cv=none; d=google.com; s=arc-20160816; b=bg3MBJHwI9Jvv5UhLPnV7oM7G9LBxM3PbaN5jKuXuXMb8R+FPTT60tQhkRNWauv9Gr TZu3wuS/NxHAbpS72Bm6QuwUVjPoX9aGG2mOp9uQ2CGBsJs/ENduXntasr3J7sWsLuKI D4tmtfibAgi1DA+4b4kL6X1Evq1h91wnplg7T2EJAF0CRdZ/x8s0CSspUlFHvuWfFXJD G2MGOGDNmnyQIaEIsQ32KfftX8/ivjjwtNvFvIsImmlDrQUhvWKIpyrSJ+VAoWwEBEv/ BaHg2tdoKsmyuqBrqwpe7wX+JJL1X4HnpSPiCUpus8sVPiqSa/Yz9iKMig7sYQl0al4f rfEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=NdYcT7deCirUwLEIexqlDXMXXq6hlwKbLOCPGehmRmA=; b=CXiKUGfS+MCF5tbD7OAm6F4WYu4XoQxQH3KylEBFnIOSKtrHYMDGqnhK0hnYvegT/4 hOgh9D/1wfTy8RTDkNjxoLDr+fTRjor7IvEKzSFo8RU9GdoPfPZiElX4DNAIhr8HJSEn kYZwEECUriSgOLPVKGaVOJAIW7qV4S16l9dAZIi3cqE6jWESGTn6geZujN3bWSNFRQDx xHEq25gi4iBcDbEKD5MZZkNbda7eQz6mTAa1hx71x385BYONokndccNlp/5PcHUrgF91 tHQH1rKZmUJbS9eBfkFN5/VTJQOVAlst0oHr61FxBVIqOdpmRQ2hKZvGl+2vnLHbXhpa sSDg== ARC-Authentication-Results: i=1; mx.google.com; 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 q8si52988674pgk.40.2018.11.23.03.27.02; Fri, 23 Nov 2018 03:27:25 -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; 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 S2405236AbeKVVOB (ORCPT + 99 others); Thu, 22 Nov 2018 16:14:01 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:15573 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388243AbeKVVOB (ORCPT ); Thu, 22 Nov 2018 16:14:01 -0500 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 0CE1CCEBE85C5; Thu, 22 Nov 2018 18:35:08 +0800 (CST) Received: from [10.151.23.176] (10.151.23.176) by smtp.huawei.com (10.3.19.204) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 22 Nov 2018 18:35:00 +0800 Subject: Re: [PATCH 08/10] staging: erofs: locked before registering for all new workgroups To: Greg Kroah-Hartman CC: , , Chao Yu , LKML , , Miao Xie References: <20181120143425.43637-1-gaoxiang25@huawei.com> <20181120143425.43637-9-gaoxiang25@huawei.com> <20181122102431.GH3189@kroah.com> From: Gao Xiang Message-ID: Date: Thu, 22 Nov 2018 18:35:00 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20181122102431.GH3189@kroah.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.151.23.176] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Greg, On 2018/11/22 18:24, Greg Kroah-Hartman wrote: >> + /* lock all primary followed works before visible to others */ >> + if (unlikely(!mutex_trylock(&work->lock))) >> + /* for a new workgroup, try_lock *never* fails */ >> + DBG_BUGON(1); > Again, drop this, if it never fails, then there's no need for this. If > it can fail, then properly handle it. > > And trylock can fail, so this needs to be fixed. OK, I will drop this. Thanks, Gao Xiang > > thanks,