aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorWANG Cong <amwang@redhat.com>2011-08-19 08:48:21 -0400
committerJens Axboe <jaxboe@fusionio.com>2011-08-19 08:48:21 -0400
commit1695b87f7dd152b866f0dd867c8e599025fc4965 (patch)
tree5ca52504b19c0640f6d9e1f59a649d6242480dd4 /drivers/block
parent25ac0c2b971235d3e8c7af0b6889a1eb6988b559 (diff)
nbd: replace sysfs_create_file() with device_create_file()
Signed-off-by: WANG Cong <amwang@redhat.com> Cc: Paul Clements <Paul.Clements@steeleye.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/nbd.c6
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}