[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4E40DE33.1070208@redhat.com>
Date: Tue, 09 Aug 2011 15:13:55 +0800
From: Cong Wang <amwang@...hat.com>
To: Joe Perches <joe@...ches.com>
CC: linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
Greg Kroah-Hartman <gregkh@...e.de>,
Paul Clements <Paul.Clements@...eleye.com>,
Jiri Kosina <trivial@...nel.org>
Subject: Re: [PATCH] nbd: some trivial improvements
于 2011年08月09日 00:37, Joe Perches 写道:
> On Mon, 2011-08-08 at 17:00 +0800, Amerigo Wang wrote:
>> This patch 1) uses task_pid_nr(current) to get the pid of current process,
>> 2) replaces sysfs_create_file() with device_create_file(), 3) lower
>> the loglevel of an error message.
>
> Just trivia:
>
>> diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
> []
>> @@ -405,10 +405,10 @@ static int nbd_do_it(struct nbd_device *lo)
>>
>> BUG_ON(lo->magic != LO_MAGIC);
>>
>> - lo->pid = current->pid;
>> - ret = sysfs_create_file(&disk_to_dev(lo->disk)->kobj,&pid_attr.attr);
>> + lo->pid = task_pid_nr(current);
>> + 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!");
>
> Missing "\n".
>
Ok, I didn't notice this, will fix it.
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists