From: "J. Bruce Fields" <bfields@fieldses.org>
To: Tejun Heo <tj@kernel.org>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
jackm@dev.mellanox.co.il, ogerlitz@mellanox.com,
roland@purestorage.com, dan.magenheimer@oracle.com,
gregkh@linuxfoundation.org, vjaquez@igalia.com,
rene.sapiens@ti.com, x0095078@ti.com, omar.ramirez@ti.com,
linux-nfs@vger.kernel.org
Subject: Re: [PATCH 1/7] nfsd: remove unused get_new_stid()
Date: Tue, 5 Mar 2013 15:05:11 -0500 [thread overview]
Message-ID: <20130305200511.GB15816@fieldses.org> (raw)
In-Reply-To: <1362513772-15174-2-git-send-email-tj@kernel.org>
On Tue, Mar 05, 2013 at 12:02:46PM -0800, Tejun Heo wrote:
> get_new_stid() is no longer used since 3abdb607125 ("nfsd4: simplify
> idr allocation"). Remove it.
Whoops, thanks for catching that.
Acked-by: J. Bruce Fields <bfields@redhat.com>
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Cc: "J. Bruce Fields" <bfields@fieldses.org>
> Cc: linux-nfs@vger.kernel.org
> ---
> fs/nfsd/nfs4state.c | 31 -------------------------------
> 1 file changed, 31 deletions(-)
>
> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> index 16d39c6..d91d6db 100644
> --- a/fs/nfsd/nfs4state.c
> +++ b/fs/nfsd/nfs4state.c
> @@ -230,37 +230,6 @@ static void nfs4_file_put_access(struct nfs4_file *fp, int oflag)
> __nfs4_file_put_access(fp, oflag);
> }
>
> -static inline int get_new_stid(struct nfs4_stid *stid)
> -{
> - static int min_stateid = 0;
> - struct idr *stateids = &stid->sc_client->cl_stateids;
> - int new_stid;
> - int error;
> -
> - error = idr_get_new_above(stateids, stid, min_stateid, &new_stid);
> - /*
> - * Note: the necessary preallocation was done in
> - * nfs4_alloc_stateid(). The idr code caps the number of
> - * preallocations that can exist at a time, but the state lock
> - * prevents anyone from using ours before we get here:
> - */
> - WARN_ON_ONCE(error);
> - /*
> - * It shouldn't be a problem to reuse an opaque stateid value.
> - * I don't think it is for 4.1. But with 4.0 I worry that, for
> - * example, a stray write retransmission could be accepted by
> - * the server when it should have been rejected. Therefore,
> - * adopt a trick from the sctp code to attempt to maximize the
> - * amount of time until an id is reused, by ensuring they always
> - * "increase" (mod INT_MAX):
> - */
> -
> - min_stateid = new_stid+1;
> - if (min_stateid == INT_MAX)
> - min_stateid = 0;
> - return new_stid;
> -}
> -
> static struct nfs4_stid *nfs4_alloc_stid(struct nfs4_client *cl, struct
> kmem_cache *slab)
> {
> --
> 1.8.1.4
>
next prev parent reply other threads:[~2013-03-05 20:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1362513772-15174-1-git-send-email-tj@kernel.org>
2013-03-05 20:02 ` [PATCH 1/7] nfsd: remove unused get_new_stid() Tejun Heo
2013-03-05 20:05 ` J. Bruce Fields [this message]
2013-03-05 20:02 ` [PATCH 2/7] nfsd: convert to idr_alloc() Tejun Heo
2013-03-05 22:31 ` 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=20130305200511.GB15816@fieldses.org \
--to=bfields@fieldses.org \
--cc=akpm@linux-foundation.org \
--cc=dan.magenheimer@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=jackm@dev.mellanox.co.il \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=ogerlitz@mellanox.com \
--cc=omar.ramirez@ti.com \
--cc=rene.sapiens@ti.com \
--cc=roland@purestorage.com \
--cc=tj@kernel.org \
--cc=vjaquez@igalia.com \
--cc=x0095078@ti.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).