Skip to content

Commit

Permalink
nbd: use task_pid_nr() to get current pid
Browse files Browse the repository at this point in the history
Signed-off-by: WANG Cong <[email protected]>
Cc: Paul Clements <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
WANG Cong authored and Jens Axboe committed Aug 19, 2011
1 parent f963d27 commit 25ac0c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/block/nbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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!");
Expand Down

0 comments on commit 25ac0c2

Please sign in to comment.