Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4519357pxj; Wed, 12 May 2021 07:22:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqhDmRz2blb18TwbpJhTODCNSsxMxogg8y3je0b+KvPBi/w/5J8TzSYiRQi81DxSvOJe22 X-Received: by 2002:a5d:638b:: with SMTP id p11mr45431447wru.90.1620829333538; Wed, 12 May 2021 07:22:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620829333; cv=none; d=google.com; s=arc-20160816; b=INzUDdLy11Xf3AqF24AN4qTYHyRe43H8bn9bnbB9A9i2WngYqObhPSq4aOtWdHVchu E7K16fFJoOaywFzgng30Adv1i8yFK8wW7hGP2hlSG0ZMy0Vz+oaVaRG9UAcP3WBfvG6E /jrG7bm6S3A8aWHCwMm94GoDHc4RHlEMGfIDxQZFLE67BYcXMjMS7YXCp1+hq7HqIR8/ nl5BS/RJHzDV8HP3v1TSyHsbfULdj+zhKG3NUMAmbeqxAFUwVwjpDvT6O8hhK6CJH+LJ crljyesXYkdXOlewjpCptehL4BrTlM8/t8sIMVI11xGpclmoK2A8Fj+tYaEFyVLsVyPd Rblg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=eOaFDmaOsRB5SZmY7GZQyJP9EcneAu4wq/VqoZMJKA0=; b=saEHlbOOLU3rlfNqF1nfoQRGEYDi9FX/wCBQLj6Wd/arF5+z/tFTIQxihSBAQ3ZHKV CFt18TLHDkTcs2VOUJVmSx8fzZ0VlWkiXK0fLxctnz9u3KguxTdBK0PbOn5pY0ryjj09 MLZ8ZDKEextT+9MBRMV9pmhtAvxFXNb4oo/Xk8RvQsDsnM1gNqW4LJXmX+45J8V9nN/w mB6PeO7wY/fNP7EEd76yNjemiOrQqnXpzncX8qkfJKBPuG1hIqit/CQ1tEVLOp3WFdSv rLnpLrWZVkEhd4AQuriQ4/xsMytwJDmM5R4oCMFeqj+BDEbBbmGnF4H3DVlb2wchwTx5 Bnpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="D/FBYaSY"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-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 x4si92323wrq.527.2021.05.12.07.21.42; Wed, 12 May 2021 07:22:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="D/FBYaSY"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230398AbhELOWs (ORCPT + 99 others); Wed, 12 May 2021 10:22:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230284AbhELOWs (ORCPT ); Wed, 12 May 2021 10:22:48 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49064C061574; Wed, 12 May 2021 07:21:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=eOaFDmaOsRB5SZmY7GZQyJP9EcneAu4wq/VqoZMJKA0=; b=D/FBYaSYWv6OzEkl4olo0BI6C6 6lwhaao1EEhwuC156MsK3O83RGoowreU8YQfQB3NMNjdeqNmm5y7zT1ognf2xw2tI+5pQvseSWoTe jKliduCU0fYTsRdguXHmSopDmUb4S9WFch0Bdz8N0ws+hdznCsYBY4CQulUwmCi/PszXrTlqmY9qd 7k/qshhU7B+zlB5i0nHn6R28xKI1JV12MkWNr55RMoRVAK3D/eYP/s31H+VF4jzQ05gupekLTW5Ko cnXx9fDn8iqGiGckS69vPlSDt6KEM8tPqYc7fF4hwIOF84lMoLJ3N+/YU7f15TMU6uaPJ3XyWf6Ip /tBDqokQ==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lgpjA-008M00-96; Wed, 12 May 2021 14:21:01 +0000 Date: Wed, 12 May 2021 15:20:44 +0100 From: Matthew Wilcox To: Jan Kara Cc: linux-fsdevel@vger.kernel.org, Christoph Hellwig , Dave Chinner , ceph-devel@vger.kernel.org, Chao Yu , Damien Le Moal , "Darrick J. Wong" , Jaegeuk Kim , Jeff Layton , Johannes Thumshirn , linux-cifs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-mm@kvack.org, linux-xfs@vger.kernel.org, Miklos Szeredi , Steve French , Ted Tso Subject: Re: [PATCH 03/11] mm: Protect operations adding pages to page cache with invalidate_lock Message-ID: References: <20210512101639.22278-1-jack@suse.cz> <20210512134631.4053-3-jack@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210512134631.4053-3-jack@suse.cz> Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, May 12, 2021 at 03:46:11PM +0200, Jan Kara wrote: > diff --git a/mm/truncate.c b/mm/truncate.c > index 57a618c4a0d6..93bde2741e0e 100644 > --- a/mm/truncate.c > +++ b/mm/truncate.c > @@ -415,7 +415,7 @@ EXPORT_SYMBOL(truncate_inode_pages_range); > * @mapping: mapping to truncate > * @lstart: offset from which to truncate > * > - * Called under (and serialised by) inode->i_rwsem. > + * Called under (and serialised by) inode->i_rwsem and inode->i_mapping_rwsem. mapping->invalidate_lock, surely? And could we ask lockdep to assert this for us instead of just a comment? > * > * Note: When this function returns, there can be a page in the process of > * deletion (inside __delete_from_page_cache()) in the specified range. Thus > -- > 2.26.2 > >