linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Stanislav Kinsbursky <skinsbursky@parallels.com>
Cc: linux-nfs@vger.kernel.org, Trond.Myklebust@netapp.com,
	linux-kernel@vger.kernel.org, devel@openvz.org
Subject: Re: [PATCH 1/2] nfsd: make NFSv4 lease time per net
Date: Wed, 28 Nov 2012 10:09:41 -0500	[thread overview]
Message-ID: <20121128150941.GF11651@fieldses.org> (raw)
In-Reply-To: <20121127111144.10271.97169.stgit@localhost.localdomain>

On Tue, Nov 27, 2012 at 02:11:44PM +0300, Stanislav Kinsbursky wrote:
> diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
> index dab350d..4930981 100644
> --- a/fs/nfsd/nfsctl.c
> +++ b/fs/nfsd/nfsctl.c
> @@ -912,7 +912,8 @@ static ssize_t nfsd4_write_time(struct file *file, char *buf, size_t size, time_
>   */
>  static ssize_t write_leasetime(struct file *file, char *buf, size_t size)
>  {
> -	return nfsd4_write_time(file, buf, size, &nfsd4_lease);
> +	struct nfsd_net *nn = net_generic(&init_net, nfsd_net_id);
> +	return nfsd4_write_time(file, buf, size, &nn->nfsd4_lease);

This is called in the context of whatever process writes to
nfsv4leasetime, so should be using its network namespace, right?

--b.

  reply	other threads:[~2012-11-28 15:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27 11:11 [PATCH 0/2] NFSd: NFSv4 state - lease and grace times per net Stanislav Kinsbursky
2012-11-27 11:11 ` [PATCH 1/2] nfsd: make NFSv4 lease time " Stanislav Kinsbursky
2012-11-28 15:09   ` J. Bruce Fields [this message]
2012-11-28 15:12     ` Stanislav Kinsbursky
2012-11-28 15:15       ` J. Bruce Fields
2012-11-28 15:35         ` Stanislav Kinsbursky
2012-11-28 16:08           ` J. Bruce Fields
2012-11-27 11:11 ` [PATCH 2/2] nfsd: make NFSv4 grace " Stanislav Kinsbursky
2012-11-28 15:10   ` J. Bruce Fields

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=20121128150941.GF11651@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=Trond.Myklebust@netapp.com \
    --cc=devel@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=skinsbursky@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;
as well as URLs for NNTP newsgroup(s).