From: Kai Huang <kai.huang@linux.intel.com>
To: viro@ZenIV.linux.org.uk
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Kai Huang <kai.huang@linux.intel.com>
Subject: [PATCH] anon_inodes: remove redundant file->f_mapping initialization
Date: Tue, 23 Jul 2019 00:09:58 +1200 [thread overview]
Message-ID: <20190722120958.9179-1-kai.huang@linux.intel.com> (raw)
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 <kai.huang@linux.intel.com>
---
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
reply other threads:[~2019-07-22 12:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190722120958.9179-1-kai.huang@linux.intel.com \
--to=kai.huang@linux.intel.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.