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 8338AC3F68F for ; Wed, 12 Feb 2020 07:37:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 509B8206DB for ; Wed, 12 Feb 2020 07:37:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 509B8206DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DC3AF6B03E6; Wed, 12 Feb 2020 02:37:21 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D73CB6B03E7; Wed, 12 Feb 2020 02:37:21 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C893B6B03E8; Wed, 12 Feb 2020 02:37:21 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0051.hostedemail.com [216.40.44.51]) by kanga.kvack.org (Postfix) with ESMTP id AF08B6B03E6 for ; Wed, 12 Feb 2020 02:37:21 -0500 (EST) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 52FE0181AEF00 for ; Wed, 12 Feb 2020 07:37:21 +0000 (UTC) X-FDA: 76480669482.15.rifle39_5f3809a5cc42 X-HE-Tag: rifle39_5f3809a5cc42 X-Filterd-Recvd-Size: 2197 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf11.hostedemail.com (Postfix) with ESMTP for ; Wed, 12 Feb 2020 07:37:20 +0000 (UTC) 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) 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 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.