lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20190722120958.9179-1-kai.huang@linux.intel.com>
Date:   Tue, 23 Jul 2019 00:09:58 +1200
From:   Kai Huang <kai.huang@...ux.intel.com>
To:     viro@...IV.linux.org.uk
Cc:     linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        Kai Huang <kai.huang@...ux.intel.com>
Subject: [PATCH] anon_inodes: remove redundant file->f_mapping initialization

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@...ux.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ