From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8CE47C5DF63 for ; Wed, 6 Nov 2019 16:42:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 48EF7207FA for ; Wed, 6 Nov 2019 16:42:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="Yy9LsNBT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 48EF7207FA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id BC8CE6B000A; Wed, 6 Nov 2019 11:42:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B51B36B000C; Wed, 6 Nov 2019 11:42:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A40EE6B000D; Wed, 6 Nov 2019 11:42:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0139.hostedemail.com [216.40.44.139]) by kanga.kvack.org (Postfix) with ESMTP id 8B79C6B000A for ; Wed, 6 Nov 2019 11:42:06 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id 32EDD181AEF1F for ; Wed, 6 Nov 2019 16:42:06 +0000 (UTC) X-FDA: 76126419852.30.mouth80_4c7e002ecfa0a X-HE-Tag: mouth80_4c7e002ecfa0a X-Filterd-Recvd-Size: 4422 Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Wed, 6 Nov 2019 16:42:05 +0000 (UTC) Received: by mail-lj1-f196.google.com with SMTP id y23so15970440ljh.10 for ; Wed, 06 Nov 2019 08:42:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=w3gb3P2HSHZ+uOjDkAzERapZeMR9/2van371GJtAxmA=; b=Yy9LsNBTWfa3r0IWIO+Fb3FHQXiwlJY807p6iV4m1gCt4Q7e53ezbT8kyt3W0H4kC+ Qx48sYyNhwmo4smJc82H2aGGon/cUfLuRe93IVoC0PANKlIQX5xloCLEAEbTr9HoS3PV ZKVCKCTJuAfKz1OWVSurkAv7QYRuTGsxdQdMI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=w3gb3P2HSHZ+uOjDkAzERapZeMR9/2van371GJtAxmA=; b=mUI7vzXKfvluyPswwOtEbkvuh6SFXYA/M0fNRGwGmi4HxXinslfnR7B0OtXXQtUd0y b0URhH0nXcHWFfdVeO6NzMv6jSkxd/i7mT6k7j9PAeWC4zsp2HA/p/0l8pq2oqLbEB3R y9qshuxLgA2aou/KOZbF1lZgbr1tzhT25V8t0kqCCMUlDYf+MvTnZB25YlAmIekn6T7T 1MHLg61S9DGMVWFQ/+XDwx1Zow/oKeZiwBk1tiVWuAUgeAHXlbvIdZAR5cVKTG4MiC1j rujPF2B1hJF/AkTtENjTZyFPm7K0fhJNiK7QIUhcWwfhxUeoeZyYopUdb0jMPUBtMEwl jMbw== X-Gm-Message-State: APjAAAXUBjyqHPZW4ZycCp+9/nY/BokojFRpS8i+OWb5NAFTLAdhMOt3 2MIQZGkP0wFd1AgDJqVHeGBbuZLr1w4= X-Google-Smtp-Source: APXvYqwgLifYupQjEG4CxrDiqPbvZfC1FnkRm+jllPkSe01L3VFtCJ56aio13FDiVHMG44oU0869RQ== X-Received: by 2002:a2e:9bc9:: with SMTP id w9mr993323ljj.35.1573058522643; Wed, 06 Nov 2019 08:42:02 -0800 (PST) Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com. [209.85.167.52]) by smtp.gmail.com with ESMTPSA id z17sm4879820ljz.30.2019.11.06.08.42.00 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Nov 2019 08:42:01 -0800 (PST) Received: by mail-lf1-f52.google.com with SMTP id 19so13387359lft.13 for ; Wed, 06 Nov 2019 08:42:00 -0800 (PST) X-Received: by 2002:a19:fc1c:: with SMTP id a28mr25233519lfi.170.1573058520643; Wed, 06 Nov 2019 08:42:00 -0800 (PST) MIME-Version: 1.0 References: <20191106051634.IwGqLbBvh%akpm@linux-foundation.org> In-Reply-To: <20191106051634.IwGqLbBvh%akpm@linux-foundation.org> From: Linus Torvalds Date: Wed, 6 Nov 2019 08:41:44 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch 05/17] ocfs2: protect extent tree in ocfs2_prepare_inode_for_write() To: Andrew Morton Cc: gechangwei@live.cn, ghe@suse.com, jiangqi903@gmail.com, jlbec@evilplan.org, junxiao.bi@oracle.com, Linux-MM , mark@fasheh.com, mm-commits@vger.kernel.org, piaojun@huawei.com, stable , sunny.s.zhang@oracle.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Nov 5, 2019 at 9:16 PM wrote: > > From: Shuning Zhang > Subject: ocfs2: protect extent tree in ocfs2_prepare_inode_for_write() > > When the extent tree is modified, it should be protected by inode cluster > lock and ip_alloc_sem. > > The extent tree is accessed and modified in the > ocfs2_prepare_inode_for_write, but isn't protected by ip_alloc_sem. This patch results in a new warning for me: fs/ocfs2/file.c:2101:12: warning: =E2=80=98ocfs2_prepare_inode_for_refcou= nt=E2=80=99 defined but not used [-Wunused-function] 2101 | static int ocfs2_prepare_inode_for_refcount(struct inode *inode, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ and I'm wondering why nobody seems to have noticed that or fixed things? Because it does look like this removed the only use of that function, and everybody who compiled this should have seen this warning? Was this not tested at all? Linus