Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273820
b: refs/heads/master
c: 1695b87
h: refs/heads/master
v: v3
  • Loading branch information
WANG Cong authored and Jens Axboe committed Aug 19, 2011
1 parent d8bb6db commit c912e53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 25ac0c2b971235d3e8c7af0b6889a1eb6988b559
refs/heads/master: 1695b87f7dd152b866f0dd867c8e599025fc4965
6 changes: 3 additions & 3 deletions trunk/drivers/block/nbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,17 +406,17 @@ static int nbd_do_it(struct nbd_device *lo)
BUG_ON(lo->magic != LO_MAGIC);

lo->pid = task_pid_nr(current);
ret = sysfs_create_file(&disk_to_dev(lo->disk)->kobj, &pid_attr.attr);
ret = device_create_file(disk_to_dev(lo->disk), &pid_attr);
if (ret) {
printk(KERN_ERR "nbd: sysfs_create_file failed!");
printk(KERN_ERR "nbd: device_create_file failed!");
lo->pid = 0;
return ret;
}

while ((req = nbd_read_stat(lo)) != NULL)
nbd_end_request(req);

sysfs_remove_file(&disk_to_dev(lo->disk)->kobj, &pid_attr.attr);
device_remove_file(disk_to_dev(lo->disk), &pid_attr);
lo->pid = 0;
return 0;
}
Expand Down

0 comments on commit c912e53

Please sign in to comment.