mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/5] nbd: use task_pid_nr() to get current pid
@ 2011-08-17  9:22 Amerigo Wang
  2011-08-17  9:22 ` [PATCH 2/5] nbd: replace sysfs_create_file() with device_create_file() Amerigo Wang
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Amerigo Wang @ 2011-08-17  9:22 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, Greg Kroah-Hartman, WANG Cong, Paul Clements

From: WANG Cong <amwang@redhat.com>


Signed-off-by: WANG Cong <amwang@redhat.com>
---
 drivers/block/nbd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index f533f33..a928287 100644
--- a/drivers/block/nbd.c
+++ b/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!");
-- 
1.7.4.4


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-08-17  9:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-17  9:22 [PATCH 1/5] nbd: use task_pid_nr() to get current pid Amerigo Wang
2011-08-17  9:22 ` [PATCH 2/5] nbd: replace sysfs_create_file() with device_create_file() Amerigo Wang
2011-08-17  9:22 ` [PATCH 3/5] nbd: replace printk KERN_ERR with dev_err() Amerigo Wang
2011-08-17  9:22 ` [PATCH 4/5] nbd: lower the loglevel of an error message Amerigo Wang
2011-08-17  9:22 ` [PATCH 5/5] nbd: replace some printk with dev_warn() and dev_info() Amerigo Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome