2.6.38-stable review patch. If anyone has any objections, please let us know.
------------------ From: Liu Yuan <[email protected]> commit ed5302d3c25006a9edc7a7fbea97a30483f89ef7 upstream. We do not call blk_trace_remove_sysfs() in err return path if kobject_add() fails. This path fixes it. Signed-off-by: Liu Yuan <[email protected]> Signed-off-by: Jens Axboe <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> --- block/blk-sysfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c @@ -511,8 +511,10 @@ int blk_register_queue(struct gendisk *d return ret; ret = kobject_add(&q->kobj, kobject_get(&dev->kobj), "%s", "queue"); - if (ret < 0) + if (ret < 0) { + blk_trace_remove_sysfs(dev); return ret; + } kobject_uevent(&q->kobj, KOBJ_ADD); _______________________________________________ stable mailing list [email protected] http://linux.kernel.org/mailman/listinfo/stable
