diff --git a/block/bsg.c b/block/bsg.c index 461c9f56f3ee557016ec3df262e95f53a3d9cb90..576933fe1860ff1c07d4603ecad5a0726447f830 100644 --- a/block/bsg.c +++ b/block/bsg.c @@ -1011,7 +1011,7 @@ int bsg_register_queue(struct request_queue *q, const char *name) } bcd->class_dev = class_dev; - if (q->kobj.dentry) { + if (q->kobj.sd) { ret = sysfs_create_link(&q->kobj, &bcd->class_dev->kobj, "bsg"); if (ret) goto err;