From: "J. Bruce Fields" <bfields@fieldses.org>
To: Pavel Emelyanov <xemul@parallels.com>
Cc: Christoph Hellwig <hch@infradead.org>, linux-nfs@vger.kernel.org
Subject: Re: [PATCH nfsd-next] nfsd: Export get_task_comm for nfsd
Date: Thu, 23 Sep 2010 10:39:06 -0400 [thread overview]
Message-ID: <20100923143906.GC1054@fieldses.org> (raw)
In-Reply-To: <4C9B63B2.4030907@parallels.com>
On Thu, Sep 23, 2010 at 06:26:58PM +0400, Pavel Emelyanov wrote:
> > Why doesn't it simply use current->comm as countless other users?
>
> Yep, this is indeed better...
>
> The git://linux-nfs.org/~bfields/linux.git nfsd-next branch doesn't
> compile when nfsd is a module with the following error:
>
> ERROR: "get_task_comm" [fs/nfsd/nfsd.ko] undefined!
>
> Replace the get_task_comm call with direct comm access, which is
> safe for current.
>
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Applied, thanks.
--b.
>
> ---
>
> diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
> index 83c82ed..b6e192d 100644
> --- a/fs/nfsd/nfsctl.c
> +++ b/fs/nfsd/nfsctl.c
> @@ -129,12 +129,10 @@ static ssize_t nfsctl_transaction_read(struct file *file, char __user *buf, size
> {
> static int warned;
> if (file->f_dentry->d_name.name[0] == '.' && !warned) {
> - char name[sizeof(current->comm)];
> printk(KERN_INFO
> "Warning: \"%s\" uses deprecated NFSD interface: %s."
> " This will be removed in 2.6.40\n",
> - get_task_comm(name, current),
> - file->f_dentry->d_name.name);
> + current->comm, file->f_dentry->d_name.name);
> warned = 1;
> }
> if (! file->private_data) {
prev parent reply other threads:[~2010-09-23 14:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-23 9:01 [PATCH nfsd-next] nfsd: Export get_task_comm for nfsd Pavel Emelyanov
2010-09-23 14:05 ` Christoph Hellwig
2010-09-23 14:26 ` Pavel Emelyanov
2010-09-23 14:39 ` J. Bruce Fields [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100923143906.GC1054@fieldses.org \
--to=bfields@fieldses.org \
--cc=hch@infradead.org \
--cc=linux-nfs@vger.kernel.org \
--cc=xemul@parallels.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox