anon_inodes: remove redundant file->f_mapping initialization
diff mbox series

Message ID 20190722120958.9179-1-kai.huang@linux.intel.com
State New
Headers show
Series
  • anon_inodes: remove redundant file->f_mapping initialization
Related show

Commit Message

Kai Huang July 22, 2019, 12:09 p.m. UTC
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(-)

Patch
diff mbox series

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;