From: Christoph Hellwig <hch@lst.de>
To: linux-ia64@vger.kernel.org
Subject: [PATCH] fix MOD_{INC,DEC}_USE_COUNT use in prominfo
Date: Fri, 07 May 2004 10:45:45 +0000 [thread overview]
Message-ID: <20040507104545.GA10909@lst.de> (raw)
set proper proc_entry owner instead. btw, the file is complete mess and
wants a rewrite at least - if not a rearchitecture for a saner
interface.
--- 1.3/arch/ia64/sn/kernel/sn2/prominfo_proc.c Wed Feb 4 06:39:51 2004
+++ edited/arch/ia64/sn/kernel/sn2/prominfo_proc.c Mon May 3 13:38:06 2004
@@ -228,11 +228,9 @@
{
int len = 0;
- MOD_INC_USE_COUNT;
/* data holds the pointer to this node's FIT */
len = dump_version(page, (unsigned long *)data);
len = proc_calc_metrics(page, start, off, count, eof, len);
- MOD_DEC_USE_COUNT;
return len;
}
@@ -242,11 +240,9 @@
{
int len = 0;
- MOD_INC_USE_COUNT;
/* data holds the pointer to this node's FIT */
len = dump_fit(page, (unsigned long *)data);
len = proc_calc_metrics(page, start, off, count, eof, len);
- MOD_DEC_USE_COUNT;
return len;
}
@@ -310,6 +306,7 @@
prominfo_init(void)
{
struct proc_dir_entry **entp;
+ struct proc_dir_entry *p;
cnodeid_t cnodeid;
nasid_t nasid;
char name[NODE_NAME_LEN];
@@ -333,12 +330,16 @@
sprintf(name, "node%d", cnodeid);
*entp = proc_mkdir(name, sgi_prominfo_entry);
nasid = cnodeid_to_nasid(cnodeid);
- create_proc_read_entry(
+ p = create_proc_read_entry(
"fit", 0, *entp, read_fit_entry,
lookup_fit(nasid));
- create_proc_read_entry(
+ if (p)
+ p->owner = THIS_MODULE;
+ p = create_proc_read_entry(
"version", 0, *entp, read_version_entry,
lookup_fit(nasid));
+ if (p)
+ p->owner = THIS_MODULE;
}
return 0;
next reply other threads:[~2004-05-07 10:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-07 10:45 Christoph Hellwig [this message]
2004-05-07 20:24 ` [PATCH] fix MOD_{INC,DEC}_USE_COUNT use in prominfo Jesse Barnes
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=20040507104545.GA10909@lst.de \
--to=hch@lst.de \
--cc=linux-ia64@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.