aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/nfs4state.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 6a7107ae6b72..6354e4fcc829 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -377,31 +377,22 @@ nfs4_find_state_owner_locked(struct nfs_server *server, struct rpc_cred *cred)
377{ 377{
378 struct rb_node **p = &server->state_owners.rb_node, 378 struct rb_node **p = &server->state_owners.rb_node,
379 *parent = NULL; 379 *parent = NULL;
380 struct nfs4_state_owner *sp, *res = NULL; 380 struct nfs4_state_owner *sp;
381 381
382 while (*p != NULL) { 382 while (*p != NULL) {
383 parent = *p; 383 parent = *p;
384 sp = rb_entry(parent, struct nfs4_state_owner, so_server_node); 384 sp = rb_entry(parent, struct nfs4_state_owner, so_server_node);
385 385
386 if (server < sp->so_server) {
387 p = &parent->rb_left;
388 continue;
389 }
390 if (server > sp->so_server) {
391 p = &parent->rb_right;
392 continue;
393 }
394 if (cred < sp->so_cred) 386 if (cred < sp->so_cred)
395 p = &parent->rb_left; 387 p = &parent->rb_left;
396 else if (cred > sp->so_cred) 388 else if (cred > sp->so_cred)
397 p = &parent->rb_right; 389 p = &parent->rb_right;
398 else { 390 else {
399 atomic_inc(&sp->so_count); 391 atomic_inc(&sp->so_count);
400 res = sp; 392 return sp;
401 break;
402 } 393 }
403 } 394 }
404 return res; 395 return NULL;
405} 396}
406 397
407static struct nfs4_state_owner * 398static struct nfs4_state_owner *