diff options
author | Tejun Heo <htejun@gmail.com> | 2007-06-13 14:45:17 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-11 19:09:06 -0400 |
commit | 7b595756ec1f49e0049a9e01a1298d53a7faaa15 (patch) | |
tree | cd06687ab3e5c7a5a4ef91903dff207a18c4db76 /drivers/pci/probe.c | |
parent | dbde0fcf9f8f6d477af3c32d9979e789ee680cde (diff) |
sysfs: kill unnecessary attribute->owner
sysfs is now completely out of driver/module lifetime game. After
deletion, a sysfs node doesn't access anything outside sysfs proper,
so there's no reason to hold onto the attribute owners. Note that
often the wrong modules were accounted for as owners leading to
accessing removed modules.
This patch kills now unnecessary attribute->owner. Note that with
this change, userland holding a sysfs node does not prevent the
backing module from being unloaded.
For more info regarding lifetime rule cleanup, please read the
following message.
http://article.gmane.org/gmane.linux.kernel/510293
(tweaked by Greg to not delete the field just yet, to make it easier to
merge things properly.)
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r-- | drivers/pci/probe.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index e48fcf089621..08783bd381f5 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -39,7 +39,6 @@ static void pci_create_legacy_files(struct pci_bus *b) | |||
39 | b->legacy_io->attr.name = "legacy_io"; | 39 | b->legacy_io->attr.name = "legacy_io"; |
40 | b->legacy_io->size = 0xffff; | 40 | b->legacy_io->size = 0xffff; |
41 | b->legacy_io->attr.mode = S_IRUSR | S_IWUSR; | 41 | b->legacy_io->attr.mode = S_IRUSR | S_IWUSR; |
42 | b->legacy_io->attr.owner = THIS_MODULE; | ||
43 | b->legacy_io->read = pci_read_legacy_io; | 42 | b->legacy_io->read = pci_read_legacy_io; |
44 | b->legacy_io->write = pci_write_legacy_io; | 43 | b->legacy_io->write = pci_write_legacy_io; |
45 | class_device_create_bin_file(&b->class_dev, b->legacy_io); | 44 | class_device_create_bin_file(&b->class_dev, b->legacy_io); |
@@ -49,7 +48,6 @@ static void pci_create_legacy_files(struct pci_bus *b) | |||
49 | b->legacy_mem->attr.name = "legacy_mem"; | 48 | b->legacy_mem->attr.name = "legacy_mem"; |
50 | b->legacy_mem->size = 1024*1024; | 49 | b->legacy_mem->size = 1024*1024; |
51 | b->legacy_mem->attr.mode = S_IRUSR | S_IWUSR; | 50 | b->legacy_mem->attr.mode = S_IRUSR | S_IWUSR; |
52 | b->legacy_mem->attr.owner = THIS_MODULE; | ||
53 | b->legacy_mem->mmap = pci_mmap_legacy_mem; | 51 | b->legacy_mem->mmap = pci_mmap_legacy_mem; |
54 | class_device_create_bin_file(&b->class_dev, b->legacy_mem); | 52 | class_device_create_bin_file(&b->class_dev, b->legacy_mem); |
55 | } | 53 | } |