diff options
author | Tejun Heo <tj@kernel.org> | 2013-03-13 17:59:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-13 18:21:45 -0400 |
commit | 801cb2d62d5f673ac671c01397956d8b77a5215b (patch) | |
tree | 21758a35a1084f2e7d4ab0f51810518f11a9dbcb /fs | |
parent | 522cff142d7d2f9230839c9e1f21a4d8bcc22a4a (diff) |
nfsd: remove unused get_new_stid()
get_new_stid() is no longer used since commit 3abdb607125 ("nfsd4:
simplify idr allocation"). Remove it.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfsd/nfs4state.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 16d39c6c4fbb..d91d6dbf698a 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) | |||
230 | __nfs4_file_put_access(fp, oflag); | 230 | __nfs4_file_put_access(fp, oflag); |
231 | } | 231 | } |
232 | 232 | ||
233 | static inline int get_new_stid(struct nfs4_stid *stid) | ||
234 | { | ||
235 | static int min_stateid = 0; | ||
236 | struct idr *stateids = &stid->sc_client->cl_stateids; | ||
237 | int new_stid; | ||
238 | int error; | ||
239 | |||
240 | error = idr_get_new_above(stateids, stid, min_stateid, &new_stid); | ||
241 | /* | ||
242 | * Note: the necessary preallocation was done in | ||
243 | * nfs4_alloc_stateid(). The idr code caps the number of | ||
244 | * preallocations that can exist at a time, but the state lock | ||
245 | * prevents anyone from using ours before we get here: | ||
246 | */ | ||
247 | WARN_ON_ONCE(error); | ||
248 | /* | ||
249 | * It shouldn't be a problem to reuse an opaque stateid value. | ||
250 | * I don't think it is for 4.1. But with 4.0 I worry that, for | ||
251 | * example, a stray write retransmission could be accepted by | ||
252 | * the server when it should have been rejected. Therefore, | ||
253 | * adopt a trick from the sctp code to attempt to maximize the | ||
254 | * amount of time until an id is reused, by ensuring they always | ||
255 | * "increase" (mod INT_MAX): | ||
256 | */ | ||
257 | |||
258 | min_stateid = new_stid+1; | ||
259 | if (min_stateid == INT_MAX) | ||
260 | min_stateid = 0; | ||
261 | return new_stid; | ||
262 | } | ||
263 | |||
264 | static struct nfs4_stid *nfs4_alloc_stid(struct nfs4_client *cl, struct | 233 | static struct nfs4_stid *nfs4_alloc_stid(struct nfs4_client *cl, struct |
265 | kmem_cache *slab) | 234 | kmem_cache *slab) |
266 | { | 235 | { |