From: wang di Date: Mon, 22 Jul 2013 16:06:25 +0000 (+0800) Subject: staging/lustre/llite: missing last bit in ll_have_md_lock X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1253b2e850850a66a71a512d2f830d4e0205ac72;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging/lustre/llite: missing last bit in ll_have_md_lock Missing the last bit during INODELOCK check in ll_have_md_lock. Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3385 Lustre-change: http://review.whamcloud.com/6438 Signed-off-by: wang di Reviewed-by: Oleg Drokin Reviewed-by: Andreas Dilger Signed-off-by: Peng Tao Signed-off-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c index ed1e3f7b4e58..efe66d996f5e 100644 --- a/drivers/staging/lustre/lustre/llite/file.c +++ b/drivers/staging/lustre/lustre/llite/file.c @@ -2448,7 +2448,7 @@ int ll_have_md_lock(struct inode *inode, __u64 *bits, ldlm_mode_t l_req_mode) ldlm_lockname[mode]); flags = LDLM_FL_BLOCK_GRANTED | LDLM_FL_CBPENDING | LDLM_FL_TEST_LOCK; - for (i = 0; i < MDS_INODELOCK_MAXSHIFT && *bits != 0; i++) { + for (i = 0; i <= MDS_INODELOCK_MAXSHIFT && *bits != 0; i++) { policy.l_inodebits.bits = *bits & (1 << i); if (policy.l_inodebits.bits == 0) continue;