Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp13872337pxu; Mon, 4 Jan 2021 06:49:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJyqE2yryibkcR34He/W2B4UEamhVvQND4rERN/RIVfumtljnZ7biU7FRfu1QNEF8hJSMiO3 X-Received: by 2002:a50:b944:: with SMTP id m62mr70496174ede.182.1609771780362; Mon, 04 Jan 2021 06:49:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609771780; cv=none; d=google.com; s=arc-20160816; b=n/e0P5LzvF7hsKAm2k6CD9yi+WAGi6YeSPH8JjozLBenYUkfLEm4d8g1ALd4J+cmFj 7tENr8Lj4GXDLkXWiWx1QcP63O38DxjIk13y8ZnRaUR2RIWRvjRcn4RSwgTSbkM5GNt2 +yoerb9DTXanKaH8gBAda/vqdjDivVZ7fTrdUZDUHgWES+CtSVn3A4mpwxF6PLszqW5D XsUoIsW3w6eywQg/rxgepkX+ue85PB/WFs8Tlk39Qp25A7++3nEORRyt2/v3Hy4NCoLg 0PgYwSeqAxLXBF+HU8E/aewsIIS7f9pUSDBJoGH8p+rZOHHm/bmifR8Omx688N6f/ZOy FVPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:mail-followup-to:reply-to:message-id :subject:cc:to:from:date; bh=Y8rebWptwK2zenvFGvrzu+WRigTDNaEM8tzmCQ7RA6Q=; b=oh35P9WYepwCQwaSmx6lvywtbp11UptnspK0Ix52d/wEL9mUrZNYzQmK5v1Xur8Dvu o2rcusQui1/SXJydlj3LmqgqlA/NMqIGIVXjT7fb/z2UrRnrrj7Uzyp0mZLmAbV8dHgf oERbvw71JF6enO2zR/CnTpxh/CB/BY68O0tar0bzJbq8K4hZhF3nmnQsobUZOo1RQeIa FvIKsAkRijsQZIMcB7s6qLhCAAKLy1qWtqQBKvEX2IvUA133wbiYk5eLPUk+g0diNi5r b81NUolD3fCZPst3aJyhgYE3706q3mAw2nibDrW8ihcWIrrW4hl04jgDwzVldGi++BXX jPyQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j20si29249827ejs.76.2021.01.04.06.49.16; Mon, 04 Jan 2021 06:49:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726419AbhADOsa (ORCPT + 99 others); Mon, 4 Jan 2021 09:48:30 -0500 Received: from mx2.suse.de ([195.135.220.15]:46524 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725840AbhADOs3 (ORCPT ); Mon, 4 Jan 2021 09:48:29 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 9E91FACBA; Mon, 4 Jan 2021 14:47:48 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 00399DA882; Mon, 4 Jan 2021 15:45:59 +0100 (CET) Date: Mon, 4 Jan 2021 15:45:59 +0100 From: David Sterba To: Zheng Yongjun Cc: clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 -next] btrfs: use DEFINE_MUTEX() for mutex lock Message-ID: <20210104144559.GF6430@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Zheng Yongjun , clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org References: <20201224132217.30741-1-zhengyongjun3@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201224132217.30741-1-zhengyongjun3@huawei.com> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 24, 2020 at 09:22:17PM +0800, Zheng Yongjun wrote: > mutex lock can be initialized automatically with DEFINE_MUTEX() > rather than explicitly calling mutex_init(). And is there some reason why it should be done that way?