diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/nbd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index a928287177fd..da98360b6463 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c | |||
@@ -406,9 +406,9 @@ static int nbd_do_it(struct nbd_device *lo) | |||
406 | BUG_ON(lo->magic != LO_MAGIC); | 406 | BUG_ON(lo->magic != LO_MAGIC); |
407 | 407 | ||
408 | lo->pid = task_pid_nr(current); | 408 | lo->pid = task_pid_nr(current); |
409 | ret = sysfs_create_file(&disk_to_dev(lo->disk)->kobj, &pid_attr.attr); | 409 | ret = device_create_file(disk_to_dev(lo->disk), &pid_attr); |
410 | if (ret) { | 410 | if (ret) { |
411 | printk(KERN_ERR "nbd: sysfs_create_file failed!"); | 411 | printk(KERN_ERR "nbd: device_create_file failed!"); |
412 | lo->pid = 0; | 412 | lo->pid = 0; |
413 | return ret; | 413 | return ret; |
414 | } | 414 | } |
@@ -416,7 +416,7 @@ static int nbd_do_it(struct nbd_device *lo) | |||
416 | while ((req = nbd_read_stat(lo)) != NULL) | 416 | while ((req = nbd_read_stat(lo)) != NULL) |
417 | nbd_end_request(req); | 417 | nbd_end_request(req); |
418 | 418 | ||
419 | sysfs_remove_file(&disk_to_dev(lo->disk)->kobj, &pid_attr.attr); | 419 | device_remove_file(disk_to_dev(lo->disk), &pid_attr); |
420 | lo->pid = 0; | 420 | lo->pid = 0; |
421 | return 0; | 421 | return 0; |
422 | } | 422 | } |