aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/nbd.c
diff options
context:
space:
mode:
authorWANG Cong <amwang@redhat.com>2011-08-19 08:48:17 -0400
committerJens Axboe <jaxboe@fusionio.com>2011-08-19 08:48:17 -0400
commit25ac0c2b971235d3e8c7af0b6889a1eb6988b559 (patch)
treebaec27728cfb9d2a544d552f80a08c810758c600 /drivers/block/nbd.c
parentf963d270cb7bbb8eeb57901d02b22a493e664fd2 (diff)
nbd: use task_pid_nr() to get current pid
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/nbd.c')
-rw-r--r--drivers/block/nbd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index f533f3375e24..a928287177fd 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -405,7 +405,7 @@ static int nbd_do_it(struct nbd_device *lo)
405 405
406 BUG_ON(lo->magic != LO_MAGIC); 406 BUG_ON(lo->magic != LO_MAGIC);
407 407
408 lo->pid = current->pid; 408 lo->pid = task_pid_nr(current);
409 ret = sysfs_create_file(&disk_to_dev(lo->disk)->kobj, &pid_attr.attr); 409 ret = sysfs_create_file(&disk_to_dev(lo->disk)->kobj, &pid_attr.attr);
410 if (ret) { 410 if (ret) {
411 printk(KERN_ERR "nbd: sysfs_create_file failed!"); 411 printk(KERN_ERR "nbd: sysfs_create_file failed!");