[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1288367495-2919-1-git-send-email-chun@gmail.com>
Date: Fri, 29 Oct 2010 11:51:35 -0400
From: Chun Wu <chun.wu84@...il.com>
To: axboe@...nel.dk
Cc: linux-kernel@...r.kernel.org, Chun Wu <chun.wu84@...il.com>
Subject: [PATCH] block: missing module_put in put_disk
From: Chun Wu <chun.wu84@...il.com>
module_put function is not called in put_disk function. Should it be added?
Signed-off-by: Chun Wu <chun.wu84@...il.com>
---
block/genhd.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/block/genhd.c b/block/genhd.c
index 5fa2b44..91299dc 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -1228,6 +1228,13 @@ EXPORT_SYMBOL(get_disk);
void put_disk(struct gendisk *disk)
{
+#ifdef CONFIG_MODULE_UNLOAD
+ struct module *owner;
+
+ owner = disk->fops->owner;
+ if (owner)
+ module_put(owner);
+#endif
if (disk)
kobject_put(&disk_to_dev(disk)->kobj);
}
--
1.5.6.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists