* [PATCH] anon_inodes: remove redundant file->f_mapping initialization
@ 2019-07-22 12:09 Kai Huang
0 siblings, 0 replies; only message in thread
From: Kai Huang @ 2019-07-22 12:09 UTC (permalink / raw)
To: viro; +Cc: linux-fsdevel, linux-kernel, Kai Huang
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-07-22 12:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-22 12:09 [PATCH] anon_inodes: remove redundant file->f_mapping initialization Kai Huang
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.