git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] fix module sysfs files reference counting
[safe/jmp/linux-2.6]
/
kernel
/
params.c
diff --git
a/kernel/params.c
b/kernel/params.c
index
c76ad25
..
a291505
100644
(file)
--- a/
kernel/params.c
+++ b/
kernel/params.c
@@
-638,13
+638,8
@@
static ssize_t module_attr_show(struct kobject *kobj,
if (!attribute->show)
return -EIO;
if (!attribute->show)
return -EIO;
- if (!try_module_get(mk->mod))
- return -ENODEV;
-
ret = attribute->show(attribute, mk->mod, buf);
ret = attribute->show(attribute, mk->mod, buf);
- module_put(mk->mod);
-
return ret;
}
return ret;
}
@@
-662,13
+657,8
@@
static ssize_t module_attr_store(struct kobject *kobj,
if (!attribute->store)
return -EIO;
if (!attribute->store)
return -EIO;
- if (!try_module_get(mk->mod))
- return -ENODEV;
-
ret = attribute->store(attribute, mk->mod, buf, len);
ret = attribute->store(attribute, mk->mod, buf, len);
- module_put(mk->mod);
-
return ret;
}
return ret;
}