From patchwork Wed Nov 13 00:42:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 11240603 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 F005D1515 for ; Wed, 13 Nov 2019 00:43:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CFCFF21A49 for ; Wed, 13 Nov 2019 00:43:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727036AbfKMAmv (ORCPT ); Tue, 12 Nov 2019 19:42:51 -0500 Received: from mga07.intel.com ([134.134.136.100]:12164 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726960AbfKMAmv (ORCPT ); Tue, 12 Nov 2019 19:42:51 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Nov 2019 16:42:50 -0800 X-IronPort-AV: E=Sophos;i="5.68,298,1569308400"; d="scan'208";a="194503911" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.157]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Nov 2019 16:42:50 -0800 From: ira.weiny@intel.com To: Alexander Viro , Andrew Morton Cc: 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 V2 1/2] fs: Clean up mapping variable Date: Tue, 12 Nov 2019 16:42:43 -0800 Message-Id: <20191113004244.9981-2-ira.weiny@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191113004244.9981-1-ira.weiny@intel.com> References: <20191113004244.9981-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. Acked-by: Darrick J. Wong Signed-off-by: Ira Weiny Reviewed-by: Darrick J. Wong --- Changes from V1 Update recipients list 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 ba3bcf4c7889..3c7777bfae17 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -3146,8 +3146,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;