OSDN Git Service

bcache: Fix a sysfs splat on shutdown
authorKent Overstreet <kmo@daterainc.com>
Thu, 11 Jul 2013 04:25:02 +0000 (21:25 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 Jul 2013 23:30:10 +0000 (16:30 -0700)
commitfe1b710530e60c8fbb07a73ad27e9f65305ce06a
tree916fed1e78bcabcb945a0e960508a97d6e7227b4
parent63a53870bb23c2d991f378ae9137d775978d5ae9
bcache: Fix a sysfs splat on shutdown

commit c9502ea4424b31728703d113fc6b30bfead14633 upstream.

If we stopped a bcache device when we were already detaching (or
something like that), bcache_device_unlink() would try to remove a
symlink from sysfs that was already gone because the bcache dev kobject
had already been removed from sysfs.

So keep track of whether we've removed stuff from sysfs.

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/bcache/bcache.h
drivers/md/bcache/super.c