Commit 25ac0c2b authored by WANG Cong's avatar WANG Cong Committed by Jens Axboe

nbd: use task_pid_nr() to get current pid

Signed-off-by: default avatarWANG Cong <amwang@redhat.com>
Cc: Paul Clements <Paul.Clements@steeleye.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
parent f963d270
...@@ -405,7 +405,7 @@ static int nbd_do_it(struct nbd_device *lo) ...@@ -405,7 +405,7 @@ static int nbd_do_it(struct nbd_device *lo)
BUG_ON(lo->magic != LO_MAGIC); 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); ret = sysfs_create_file(&disk_to_dev(lo->disk)->kobj, &pid_attr.attr);
if (ret) { if (ret) {
printk(KERN_ERR "nbd: sysfs_create_file failed!"); printk(KERN_ERR "nbd: sysfs_create_file failed!");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment