From patchwork Fri Nov 29 16:32:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 11267377 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C8C5717F0 for ; Fri, 29 Nov 2019 16:33:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A77C42176D for ; Fri, 29 Nov 2019 16:33:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727227AbfK2QdK (ORCPT ); Fri, 29 Nov 2019 11:33:10 -0500 Received: from mga14.intel.com ([192.55.52.115]:61235 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727200AbfK2QdJ (ORCPT ); Fri, 29 Nov 2019 11:33:09 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Nov 2019 08:33:07 -0800 X-IronPort-AV: E=Sophos;i="5.69,257,1571727600"; d="scan'208";a="261567546" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.157]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Nov 2019 08:33:07 -0800 From: ira.weiny@intel.com To: Andrew Morton Cc: Alexander Viro , Chris Mason , Josef Bacik , David Sterba , Jaegeuk Kim , Chao Yu , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, Trond Myklebust , Anna Schumaker , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-nfs@vger.kernel.org, linux-mm@kvack.org, Ira Weiny , "Darrick J . Wong" Subject: [PATCH V3 1/3] fs: Clean up mapping variable Date: Fri, 29 Nov 2019 08:32:58 -0800 Message-Id: <20191129163300.14749-2-ira.weiny@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191129163300.14749-1-ira.weiny@intel.com> References: <20191129163300.14749-1-ira.weiny@intel.com> MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org From: Ira Weiny The mapping variable is not directly used in these functions. Just remove the additional variable. Reviewed-by: Darrick J. Wong Signed-off-by: Ira Weiny --- Changes from V2: updated Reviews fs/f2fs/data.c | 3 +-- fs/iomap/swapfile.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index a034cd0ce021..9067c7e68992 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -3147,8 +3147,7 @@ int f2fs_migrate_page(struct address_space *mapping, /* Copied from generic_swapfile_activate() to check any holes */ static int check_swap_activate(struct file *swap_file, unsigned int max) { - struct address_space *mapping = swap_file->f_mapping; - struct inode *inode = mapping->host; + struct inode *inode = swap_file->f_mapping->host; unsigned blocks_per_page; unsigned long page_no; unsigned blkbits; diff --git a/fs/iomap/swapfile.c b/fs/iomap/swapfile.c index a648dbf6991e..80571add0180 100644 --- a/fs/iomap/swapfile.c +++ b/fs/iomap/swapfile.c @@ -140,8 +140,7 @@ int iomap_swapfile_activate(struct swap_info_struct *sis, .sis = sis, .lowest_ppage = (sector_t)-1ULL, }; - struct address_space *mapping = swap_file->f_mapping; - struct inode *inode = mapping->host; + struct inode *inode = swap_file->f_mapping->host; loff_t pos = 0; loff_t len = ALIGN_DOWN(i_size_read(inode), PAGE_SIZE); loff_t ret;