Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea08f10
)
Make ldlm_cli_cancel_unused not return an error for invalid resource. This is
author
pschwan
<pschwan>
Fri, 4 Oct 2002 14:29:59 +0000
(14:29 +0000)
committer
pschwan
<pschwan>
Fri, 4 Oct 2002 14:29:59 +0000
(14:29 +0000)
a very common case, where a file is opened and then closed without locks having
been taken.
lustre/ldlm/ldlm_request.c
patch
|
blob
|
history
diff --git
a/lustre/ldlm/ldlm_request.c
b/lustre/ldlm/ldlm_request.c
index
5917b56
..
3947602
100644
(file)
--- a/
lustre/ldlm/ldlm_request.c
+++ b/
lustre/ldlm/ldlm_request.c
@@
-485,8
+485,11
@@
int ldlm_cli_cancel_unused(struct ldlm_namespace *ns, __u64 *res_id,
ENTRY;
res = ldlm_resource_get(ns, NULL, res_id, 0, 0);
- if (res == NULL)
- RETURN(-EINVAL);
+ if (res == NULL) {
+ /* This is not a problem. */
+ CDEBUG(D_INFO, "No resource "LPU64"\n", res_id[0]);
+ RETURN(0);
+ }
l_lock(&ns->ns_lock);
list_for_each(tmp, &res->lr_granted) {