From: Alan Jenkins Date: Wed, 29 Jul 2009 19:07:55 +0000 (+0200) Subject: PM / Hibernate: Replace bdget call with simple atomic_inc of i_count X-Git-Tag: v2.6.31-rc5~18^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dddac6a7b445de95515f64fdf82fe5dc36c02f26;p=pandora-kernel.git PM / Hibernate: Replace bdget call with simple atomic_inc of i_count Create bdgrab(). This function copies an existing reference to a block_device. It is safe to call from any context. Hibernation code wishes to copy a reference to the active swap device. Right now it calls bdget() under a spinlock, but this is wrong because bdget() can sleep. It doesn't need a full bdget() because we already hold a reference to active swap devices (and the spinlock protects against swapoff). Fixes http://bugzilla.kernel.org/show_bug.cgi?id=13827 Signed-off-by: Alan Jenkins Signed-off-by: Rafael J. Wysocki --- Reading git-diff-tree failed