Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp400176pxj; Thu, 10 Jun 2021 03:41:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZIeNxjlxHzUEOzT5e2NIZrtR7CNFjWXR8PW7kw+PtVEjtSdqX8Oy618NLcVVqU6COJWIU X-Received: by 2002:a17:906:8319:: with SMTP id j25mr3799800ejx.479.1623321686433; Thu, 10 Jun 2021 03:41:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623321686; cv=none; d=google.com; s=arc-20160816; b=rCsH82aUJF6lwv12nf/NNTv6MO/N0N6s592FRL3FZIlwX+ojNvgmOgx3vb8WeaNcs4 wlgvE5L5wNWjELmkSl6VMajI81OBWNPtk3YqzPR9+Yo0TKb9m9lHodntfc5Omu7CXzYB guOiE9HjtnicLOBbCYK4dwGtzYq3rLUa+I45T/4mtOAj03QiS+g+UR89lMPhBEUo8qCQ A2AY6l7tZno517d8eGoAGu0dKcpAMgK3nLJV0WM+Zpjw7cm8Wj3y8m0SI+tN3SGGZgJi wWHKu0Mq34X5QhlOBd3Tev+DsN2ZWA9uX3RNwdB9gCVr5hK8c57y/LnQoleDvg53LxBD ssEg== 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:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=e69p7cSpTPxrgycR/WxxaL+1l2Iy0njG9LV0PDer+c4=; b=Ttzj+1QT+5q+GP40MKAQH2Oyu0ESHFiYwn58iKASzni3fHf6vlXMbRCTUSE97zXhdF 697jk6QeQ+zB4zWr8JxXyqDXTdLvGtcE4fm4jkPf84XNdFqxGPkp4eueIvHXPEOUHohm zrf6fNeEY9IhbghXYLXL4A/HKrYQia5JBgbm7+4xWwB7Sk1v1DjcdEYWssjDCD/TJn8g iBa5b9uoFht+LJnZiyJTgrjtouVI74rJhpuIlUONbahF8H15DeYDIsXXYH5Ehcb0e000 1k2TP1b5vXSTpN1kRpYM1AXyMQiM2M/iinWd4vLax2Cwaq6BXlv3FxyMlhrIhuuwYprc GP6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=WNzicnn9; dkim=neutral (no key) header.i=@suse.cz; 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 u17si1931811edr.539.2021.06.10.03.40.57; Thu, 10 Jun 2021 03:41:26 -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=@suse.cz header.s=susede2_rsa header.b=WNzicnn9; dkim=neutral (no key) header.i=@suse.cz; 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 S229961AbhFJKmq (ORCPT + 99 others); Thu, 10 Jun 2021 06:42:46 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:55992 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229770AbhFJKmq (ORCPT ); Thu, 10 Jun 2021 06:42:46 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id BB0721FD47; Thu, 10 Jun 2021 10:40:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1623321648; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=e69p7cSpTPxrgycR/WxxaL+1l2Iy0njG9LV0PDer+c4=; b=WNzicnn9I9Uzi3rhrzU3g34rvVnvDxp/dzgOfJ8QelNeJaO+n3iduUNFK/9KFkm8z8EeQW NL1SjEN/b720E7re5xPsC8EubYb6b5KZXIu9/vLgcdL89PUhpyLXDk4QFY4xIwUI5aT9rc RHr+TtYt2pnBErVijdh7TG9nIRAFQQs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1623321648; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=e69p7cSpTPxrgycR/WxxaL+1l2Iy0njG9LV0PDer+c4=; b=ldzR16nIFLY7YSLUeT9j/700yV/caPCby06yFrv/SQbZy/V+JI6iP9FH6mfkFJSIwBuRfv KhEDZH21lxejVFDA== Received: from quack2.suse.cz (unknown [10.100.200.198]) by relay2.suse.de (Postfix) with ESMTP id 24988A3B8B; Thu, 10 Jun 2021 10:40:48 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id E025A1F2CAB; Thu, 10 Jun 2021 12:40:47 +0200 (CEST) Date: Thu, 10 Jun 2021 12:40:47 +0200 From: Jan Kara To: Ming Lei Cc: Jan Kara , 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 , Matthew Wilcox , Christoph Hellwig , Hugh Dickins Subject: Re: [PATCH 01/14] mm: Fix comments mentioning i_mutex Message-ID: <20210610104047.GA23539@quack2.suse.cz> References: <20210607144631.8717-1-jack@suse.cz> <20210607145236.31852-1-jack@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu 10-06-21 17:06:41, Ming Lei wrote: > On Mon, Jun 07, 2021 at 04:52:11PM +0200, Jan Kara wrote: > > inode->i_mutex has been replaced with inode->i_rwsem long ago. Fix > > comments still mentioning i_mutex. > > > > Reviewed-by: Christoph Hellwig > > Acked-by: Hugh Dickins > > Signed-off-by: Jan Kara > > --- > > ... > > > diff --git a/mm/rmap.c b/mm/rmap.c > > index 693a610e181d..a35cbbbded0d 100644 > > --- a/mm/rmap.c > > +++ b/mm/rmap.c > > @@ -20,9 +20,9 @@ > > /* > > * Lock ordering in mm: > > * > > - * inode->i_mutex (while writing or truncating, not reading or faulting) > > + * inode->i_rwsem (while writing or truncating, not reading or faulting) > > * mm->mmap_lock > > - * page->flags PG_locked (lock_page) * (see huegtlbfs below) > > + * page->flags PG_locked (lock_page) * (see hugetlbfs below) > > * hugetlbfs_i_mmap_rwsem_key (in huge_pmd_share) > > * mapping->i_mmap_rwsem > > * hugetlb_fault_mutex (hugetlbfs specific page fault mutex) > > @@ -41,7 +41,7 @@ > > * in arch-dependent flush_dcache_mmap_lock, > > * within bdi.wb->list_lock in __sync_single_inode) > > * > > - * anon_vma->rwsem,mapping->i_mutex (memory_failure, collect_procs_anon) > > + * anon_vma->rwsem,mapping->i_mmap_rwsem (memory_failure, collect_procs_anon) > > This one looks a typo. Actually it isn't a typo. Memory failure path doesn't touch inode->i_rwsem at all. It uses mapping->i_mmap_rwsem in collect_procs_file(). So perhaps the functions listed there should be updated to (collect_procs_anon(), collect_procs_file()) but the lock name change is IMO correct. Honza -- Jan Kara SUSE Labs, CR