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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54A06B70.20707@users.sourceforge.net>
Date:	Sun, 28 Dec 2014 21:43:28 +0100
From:	SF Markus Elfring <elfring@...rs.sourceforge.net>
To:	Eric Van Hensbergen <ericvh@...il.com>,
	Latchesar Ionkov <lucho@...kov.net>,
	Ron Minnich <rminnich@...dia.gov>,
	v9fs-developer@...ts.sourceforge.net
CC:	LKML <linux-kernel@...r.kernel.org>,
	kernel-janitors@...r.kernel.org,
	Julia Lawall <julia.lawall@...6.fr>
Subject: [PATCH 3/8] fs/9p: One function call less in v9fs_vfs_atomic_open()
 after error detection

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sun, 28 Dec 2014 08:45:31 +0100

The p9_client_clunk() function was called in one case by the
v9fs_vfs_atomic_open() function during error handling even if the passed
variable "fid" contained a null pointer.

This implementation detail could be improved by the adjustment of a jump target.
Let us delete also an unnecessary variable assignment there.

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 fs/9p/vfs_inode.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 81b945a..f568427 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -873,8 +873,7 @@ v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry,
 						v9fs_proto_dotu(v9ses)));
 	if (IS_ERR(fid)) {
 		err = PTR_ERR(fid);
-		fid = NULL;
-		goto error;
+		goto out;
 	}
 
 	v9fs_invalidate_inode_attr(dir);
-- 
2.2.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ