Browse Source

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>
WANG Cong 14 years ago
parent
commit
25ac0c2b97
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/block/nbd.c

+ 1 - 1
drivers/block/nbd.c

@@ -405,7 +405,7 @@ static int nbd_do_it(struct nbd_device *lo)
 
 	BUG_ON(lo->magic != LO_MAGIC);
 
-	lo->pid = current->pid;
+	lo->pid = task_pid_nr(current);
 	ret = sysfs_create_file(&disk_to_dev(lo->disk)->kobj, &pid_attr.attr);
 	if (ret) {
 		printk(KERN_ERR "nbd: sysfs_create_file failed!");