]> git.baikalelectronics.ru Git - kernel.git/commit
block: initialise bd_super in bdget()
authorLachlan McIlroy <lmcilroy@redhat.com>
Thu, 30 Jun 2011 01:01:45 +0000 (11:01 +1000)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 1 Aug 2011 05:57:44 +0000 (01:57 -0400)
commita6fb216c1d9a77ac0969097e5a674fad02f08ab1
treee0ea0054539a695707f4e54aacdb0c53cd990076
parent4d0e8358ca8c21b97fbeab6dde99c816b0c259bf
block: initialise bd_super in bdget()

bd_super is currently reset to NULL in kill_block_super() so we rely on previous
users of the block_device object to initialise this value for the next user.
This quirk was exposed on RHEL5 when a third party filesystem did not always use
kill_block_super() and therefore bd_super wasn't being reset when a block_device
object was recycled within the cache.  This may not be a problem upstream but
makes sense to be defensive.

Signed-off-by: Lachlan McIlroy <lmcilroy@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/block_dev.c