Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7023182ybi; Mon, 22 Jul 2019 05:53:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqydHYO+IG80Xv8QskwEM1W05EfczoyFn6sBEgTClf5L4g0Ob92nIUAhPgL7RD7/NB9D5OVL X-Received: by 2002:a62:e71a:: with SMTP id s26mr98169pfh.89.1563799989034; Mon, 22 Jul 2019 05:53:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563799989; cv=none; d=google.com; s=arc-20160816; b=v6abKjpUaCwFI/0z7G2lMvm753DezksPpmnUki5sg1o18a4r+wIOCwthWDnk1N/oey 8mPLiVIA2JCDkAQMnpZVSAnaHLs6hzFiEk1wdfyheY4YSQ9ve8TGkgevW1BZoBKoGyP/ AWg5hmoFcuLt8W9yPaD82ZL0VhEBxmQLFDl6l+8IOw8R2K+WwB5LSTLUeCADNC+gcYj6 MSuW/A0QtIcQQ89E+J3uxwPDztIRFcQRmoHLhvfneyKxE0y/AX29eok6e06ipHl4FlH3 J/BR1iMyAwckBWN6VbvCSs0h6FC2iPCIkfrWBy7UV90nJaLfI/V9WXExaM7b00rxatpZ Ynmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=W7/qCCFA27lDRCXVTJaqmAw8X82YxLBrCYkst5ACaFo=; b=hMX5zLwrPgx/8m3LrNPG7TkepOcYlon6ghCmqQX4ARTn9CG9mdHAqh/EvRnutMkLS0 GAMMgfcaHbpgnGKPJTA73L4DdAcK4fxAa5EcUiTovP04c1Lxycm0FU6iAUwTcLLNcMCA JmQCtHhJ/U2Tnf3YrNNIeexeURn+ijIu0+SEVLsKbBY0H867BV+1IJbfy4o8GI8QUC+L ypY2q6p7hz9+hzveJr+3AgpN9a3t8KKkiE16rEE6XX+LUYLtCnFNZoNDsIKLm9wjROvj giUabziL6w/MiN+C5ZQvmsMtlXsCCKszpKhFqpBNVgDDFPx6E89pFgM96+Hq3RYSnHVr wjog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h98si8796174plb.206.2019.07.22.05.52.53; Mon, 22 Jul 2019 05:53:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729217AbfGVMLP (ORCPT + 99 others); Mon, 22 Jul 2019 08:11:15 -0400 Received: from mga14.intel.com ([192.55.52.115]:23024 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727164AbfGVMLO (ORCPT ); Mon, 22 Jul 2019 08:11:14 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jul 2019 05:11:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,295,1559545200"; d="scan'208";a="180378524" Received: from khuang2-desk.gar.corp.intel.com ([10.254.182.119]) by orsmga002.jf.intel.com with ESMTP; 22 Jul 2019 05:11:12 -0700 From: Kai Huang To: viro@ZenIV.linux.org.uk Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Kai Huang Subject: [PATCH] anon_inodes: remove redundant file->f_mapping initialization Date: Tue, 23 Jul 2019 00:09:58 +1200 Message-Id: <20190722120958.9179-1-kai.huang@linux.intel.com> X-Mailer: git-send-email 2.13.6 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In anon_inode_getfile(), file->f_mapping is redundantly initialized to anon_inode_inode->i_mapping, since it has already been initialized in alloc_file_pseudo() -> alloc_file(), so remove the initialization in anon_inode_getfile(). Signed-off-by: Kai Huang --- fs/anon_inodes.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c index 89714308c25b..b8b77066a1b9 100644 --- a/fs/anon_inodes.c +++ b/fs/anon_inodes.c @@ -93,8 +93,6 @@ struct file *anon_inode_getfile(const char *name, if (IS_ERR(file)) goto err; - file->f_mapping = anon_inode_inode->i_mapping; - file->private_data = priv; return file; -- 2.13.6