aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2012-04-23 15:08:52 -0400
committerDavid Teigland <teigland@redhat.com>2012-04-26 16:37:56 -0400
commit57638bf3aa64facd9eba0e018b5773f5d2da6c2b (patch)
tree7d85777d3371f0a61172ef97a8b8d6a766e7ac18 /fs/dlm
parentd6e24788d21c4f1a8f00c811c31dd4e9a58679ac (diff)
dlm: avoid unnecessary search in search_rsb
If the rsb is found in the "keep" tree, but is not the right type (i.e. not MASTER), we can return immediately with the result. There's no point in going on to search the "toss" list as if we hadn't found it. Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm')
-rw-r--r--fs/dlm/lock.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index 3d35c593f4c1..49926f1df23e 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -479,6 +479,9 @@ static int _search_rsb(struct dlm_ls *ls, char *name, int len, int b,
479 kref_get(&r->res_ref); 479 kref_get(&r->res_ref);
480 goto out; 480 goto out;
481 } 481 }
482 if (error == -ENOTBLK)
483 goto out;
484
482 error = dlm_search_rsb_tree(&ls->ls_rsbtbl[b].toss, name, len, flags, &r); 485 error = dlm_search_rsb_tree(&ls->ls_rsbtbl[b].toss, name, len, flags, &r);
483 if (error) 486 if (error)
484 goto out; 487 goto out;