* [PATCH 4/8] dlm: avoid unnecessary search in search_rsb
@ 2012-05-21 21:18 David Teigland
0 siblings, 0 replies; only message in thread
From: David Teigland @ 2012-05-21 21:18 UTC (permalink / raw)
To: linux-kernel
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>
---
fs/dlm/lock.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index 3d35c59..49926f1 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,
kref_get(&r->res_ref);
goto out;
}
+ if (error == -ENOTBLK)
+ goto out;
+
error = dlm_search_rsb_tree(&ls->ls_rsbtbl[b].toss, name, len, flags, &r);
if (error)
goto out;
--
1.7.10.1.362.g242cab3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-05-21 21:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-21 21:18 [PATCH 4/8] dlm: avoid unnecessary search in search_rsb David Teigland
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®