summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Drokin <green@linuxhacker.ru>2016-06-20 20:55:29 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-06-20 21:28:39 (GMT)
commitfbe0456482aa5c482342735f342483a75ada8b96 (patch)
treed36b733a1670b5b28ad2fb7ac728bef3cf3fab85
parenta6307ff9aaeda8691204dc0ea30cd3680d06f6b3 (diff)
downloadlinux-fbe0456482aa5c482342735f342483a75ada8b96.tar.xz
staging/lustre/osc: Fix reverted condition in osc_lock_weight
When imprting clio simplification patch, the check for pbject got reversed by mistake when converting from if (obj == NULL) it somehow became (if (obj) which is obviously wrong, and so when it does hit, a crash was happening as result. Fix the condition and all if fine now. Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/lustre/lustre/osc/osc_lock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/osc/osc_lock.c b/drivers/staging/lustre/lustre/osc/osc_lock.c
index d856775..5455d9d 100644
--- a/drivers/staging/lustre/lustre/osc/osc_lock.c
+++ b/drivers/staging/lustre/lustre/osc/osc_lock.c
@@ -699,7 +699,7 @@ unsigned long osc_ldlm_weigh_ast(struct ldlm_lock *dlmlock)
LASSERT(dlmlock->l_resource->lr_type == LDLM_EXTENT);
obj = dlmlock->l_ast_data;
- if (obj) {
+ if (!obj) {
weight = 1;
goto out;
}