From: Jeff Mahoney Date: Mon, 26 Jun 2006 07:27:25 +0000 (-0700) Subject: [PATCH] dm: add module ref counting X-Git-Tag: v2.6.18-rc1~663 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10da4f795f965f22039aa2930b6f80964aad3ee5;p=pandora-kernel.git [PATCH] dm: add module ref counting The reference counting on dm-mod is zero if no mapped devices are open. This is incorrect, and can lead to an oops if the module is unloaded while mapped devices exist. This patch claims a reference to the module whenever a device is created, and drops it again when the device is freed. Devices must be removed before dm-mod is unloaded. [akpm: too late for 2.6.17 - suitable for 2.6.17.x after it has settled] Signed-off-by: Jeff Mahoney Signed-off-by: Alasdair G Kergon Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed