linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: linux-kernel@vger.kernel.org,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	linux-fsdevel@vger.kernel.org
Subject: [PATCH v2 3/8] seq_file: use seq_open_data in __seq_open_private
Date: Sat, 18 Aug 2018 15:24:29 +0200	[thread overview]
Message-ID: <20180818132434.9515-3-linux@rasmusvillemoes.dk> (raw)
In-Reply-To: <20180818132434.9515-1-linux@rasmusvillemoes.dk>

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
 fs/seq_file.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/fs/seq_file.c b/fs/seq_file.c
index 518a72e444d9..5cc4670294e7 100644
--- a/fs/seq_file.c
+++ b/fs/seq_file.c
@@ -632,18 +632,15 @@ void *__seq_open_private(struct file *f, const struct seq_operations *ops,
 {
 	int rc;
 	void *private;
-	struct seq_file *seq;
 
 	private = kzalloc(psize, GFP_KERNEL_ACCOUNT);
 	if (private == NULL)
 		goto out;
 
-	rc = seq_open(f, ops);
+	rc = seq_open_data(f, ops, private);
 	if (rc < 0)
 		goto out_free;
 
-	seq = f->private_data;
-	seq->private = private;
 	return private;
 
 out_free:
-- 
2.16.4

  parent reply	other threads:[~2018-08-18 16:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-18 13:24 [PATCH v2 1/8] seq_file: introduce seq_open_data helper Rasmus Villemoes
2018-08-18 13:24 ` [PATCH v2 2/8] seq_file: use seq_open_data in single_open Rasmus Villemoes
2018-08-18 13:24 ` Rasmus Villemoes [this message]
2018-08-18 13:24 ` [PATCH v2 4/8] proc: use seq_open_data() in proc_id_map_open() Rasmus Villemoes
2018-08-19 12:21 ` [PATCH v2 1/8] seq_file: introduce seq_open_data helper Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180818132434.9515-3-linux@rasmusvillemoes.dk \
    --to=linux@rasmusvillemoes.dk \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).