mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Whitehouse <steve@gw.chygwyn.com>
To: acme@conectiva.com.br (Arnaldo Carvalho de Melo)
Cc: davem@redhat.com (David S. Miller),
	hch@infradead.org, linux-decnet-user@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: Re: Remains of seq_file conversion for DECnet, plus fixes
Date: Sun, 4 May 2003 19:43:51 +0100 (BST)	[thread overview]
Message-ID: <200305041843.TAA04564@gw.chygwyn.com> (raw)
In-Reply-To: <20030502015409.GC5356@conectiva.com.br> from "Arnaldo Carvalho de Melo" at May 01, 2003 10:54:10 PM

Hi,

Now that I'm back again, here is the first patch again with kfree_release
renamed as suggested to seq_release_private,

Steve.
-----------------------------------------------------------------------------
diff -Nru linux-2.5.68-bk12/fs/seq_file.c linux/fs/seq_file.c
--- linux-2.5.68-bk12/fs/seq_file.c	Sat Apr 19 19:50:30 2003
+++ linux/fs/seq_file.c	Sun May  4 11:45:16 2003
@@ -338,3 +338,13 @@
 	kfree(op);
 	return res;
 }
+
+int seq_release_private(struct inode *inode, struct file *file)
+{
+	struct seq_file *seq = file->private_data;
+
+	kfree(seq->private);
+	seq->private = NULL;
+	return seq_release(inode, file);
+}
+
diff -Nru linux-2.5.68-bk12/include/linux/proc_fs.h linux/include/linux/proc_fs.h
--- linux-2.5.68-bk12/include/linux/proc_fs.h	Sat Apr 19 19:48:46 2003
+++ linux/include/linux/proc_fs.h	Sun May  4 11:45:16 2003
@@ -163,6 +163,15 @@
 	return create_proc_info_entry(name,mode,proc_net,get_info);
 }
 
+static inline struct proc_dir_entry *proc_net_fops_create(const char *name,
+	mode_t mode, struct file_operations *fops)
+{
+	struct proc_dir_entry *res = create_proc_entry(name, mode, proc_net);
+	if (res)
+		res->proc_fops = fops;
+	return res;
+}
+
 static inline void proc_net_remove(const char *name)
 {
 	remove_proc_entry(name,proc_net);
@@ -171,7 +180,7 @@
 #else
 
 #define proc_root_driver NULL
-
+#define proc_net_fops_create(name,mode,fops) do {} while(0)
 static inline struct proc_dir_entry *proc_net_create(const char *name, mode_t mode, 
 	get_info_t *get_info) {return NULL;}
 static inline void proc_net_remove(const char *name) {}
diff -Nru linux-2.5.68-bk12/include/linux/seq_file.h linux/include/linux/seq_file.h
--- linux-2.5.68-bk12/include/linux/seq_file.h	Sat Apr 19 19:51:18 2003
+++ linux/include/linux/seq_file.h	Sun May  4 11:45:16 2003
@@ -60,5 +60,6 @@
 
 int single_open(struct file *, int (*)(struct seq_file *, void *), void *);
 int single_release(struct inode *, struct file *);
+int seq_release_private(struct inode *, struct file *);
 #endif
 #endif
diff -Nru linux-2.5.68-bk12/kernel/ksyms.c linux/kernel/ksyms.c
--- linux-2.5.68-bk12/kernel/ksyms.c	Sun May  4 11:37:41 2003
+++ linux/kernel/ksyms.c	Sun May  4 11:45:16 2003
@@ -540,6 +540,7 @@
 EXPORT_SYMBOL(seq_lseek);
 EXPORT_SYMBOL(single_open);
 EXPORT_SYMBOL(single_release);
+EXPORT_SYMBOL(seq_release_private);
 
 /* Program loader interfaces */
 #ifdef CONFIG_MMU

  reply	other threads:[~2003-05-04 18:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20030421.234303.59654654.davem@redhat.com>
2003-05-01 13:27 ` Steven Whitehouse
2003-05-01 12:45   ` David S. Miller
2003-05-01 14:04     ` Steven Whitehouse
2003-05-01 13:09       ` David S. Miller
2003-05-01 20:52         ` Steven Whitehouse
2003-05-01 20:57           ` Christoph Hellwig
2003-05-01 21:35             ` Steven Whitehouse
2003-05-01 21:22               ` David S. Miller
2003-05-02  1:54                 ` Arnaldo Carvalho de Melo
2003-05-04 18:43                   ` Steven Whitehouse [this message]
2003-05-06  6:46                     ` David S. Miller
2003-05-01 20:55         ` Remains of seq_file conversion for DECnet, plus fixes (part 2) Steven Whitehouse
2003-05-01 20:57         ` Remains of seq_file conversion for DECnet, plus fixes (part 3) Steven Whitehouse

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=200305041843.TAA04564@gw.chygwyn.com \
    --to=steve@gw.chygwyn.com \
    --cc=Steve@ChyGwyn.com \
    --cc=acme@conectiva.com.br \
    --cc=davem@redhat.com \
    --cc=hch@infradead.org \
    --cc=linux-decnet-user@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®