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=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 70C2CC3F68F for ; Wed, 12 Feb 2020 07:37:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 470BA20873 for ; Wed, 12 Feb 2020 07:37:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728331AbgBLHhV (ORCPT ); Wed, 12 Feb 2020 02:37:21 -0500 Received: from verein.lst.de ([213.95.11.211]:36725 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727669AbgBLHhU (ORCPT ); Wed, 12 Feb 2020 02:37:20 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id BD9B868B05; Wed, 12 Feb 2020 08:37:17 +0100 (CET) Date: Wed, 12 Feb 2020 08:37:17 +0100 From: Christoph Hellwig To: Andrew Morton Cc: Christoph Hellwig , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, Waiman Long , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Will Deacon , linux-ext4@vger.kernel.org, cluster-devel@redhat.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Naohiro Aota Subject: Re: [PATCH 01/12] mm: fix a comment in sys_swapon Message-ID: <20200212073717.GB25555@lst.de> References: <20200114161225.309792-1-hch@lst.de> <20200114161225.309792-2-hch@lst.de> <20200210152942.2ec4d0b71851feccb7387266@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200210152942.2ec4d0b71851feccb7387266@linux-foundation.org> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Mon, Feb 10, 2020 at 03:29:42PM -0800, Andrew Morton wrote: > On Tue, 14 Jan 2020 17:12:14 +0100 Christoph Hellwig wrote: > > > claim_swapfile now always takes i_rwsem. > > > > ... > > > > --- a/mm/swapfile.c > > +++ b/mm/swapfile.c > > @@ -3157,7 +3157,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags) > > mapping = swap_file->f_mapping; > > inode = mapping->host; > > > > - /* If S_ISREG(inode->i_mode) will do inode_lock(inode); */ > > + /* will take i_rwsem; */ > > error = claim_swapfile(p, inode); > > if (unlikely(error)) > > goto bad_swap; > > http://lkml.kernel.org/r/20200206090132.154869-1-naohiro.aota@wdc.com > removes this comment altogether. Please check that this is OK? Killing it is fine with me. Just the fact that the comment was wrong while I did an audit of the area really thew me off.