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: <20180818132434.9515-2-linux@rasmusvillemoes.dk>
Date:   Sat, 18 Aug 2018 15:24:28 +0200
From:   Rasmus Villemoes <linux@...musvillemoes.dk>
To:     Alexander Viro <viro@...iv.linux.org.uk>
Cc:     linux-kernel@...r.kernel.org,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        linux-fsdevel@...r.kernel.org
Subject: [PATCH v2 2/8] seq_file: use seq_open_data in single_open

Avoid the somewhat hard to grok assignment by using the seq_open_data
helper.

Signed-off-by: Rasmus Villemoes <linux@...musvillemoes.dk>
---
 fs/seq_file.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/seq_file.c b/fs/seq_file.c
index c8c86660f6db..518a72e444d9 100644
--- a/fs/seq_file.c
+++ b/fs/seq_file.c
@@ -582,10 +582,8 @@ int single_open(struct file *file, int (*show)(struct seq_file *, void *),
 		op->next = single_next;
 		op->stop = single_stop;
 		op->show = show;
-		res = seq_open(file, op);
-		if (!res)
-			((struct seq_file *)file->private_data)->private = data;
-		else
+		res = seq_open_data(file, op, data);
+		if (res)
 			kfree(op);
 	}
 	return res;
-- 
2.16.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ