staging/lustre/llite: missing last bit in ll_have_md_lock
authorwang di <di.wang@intel.com>
Mon, 22 Jul 2013 16:06:25 +0000 (00:06 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2013 19:37:41 +0000 (12:37 -0700)
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 <di.wang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/file.c

index ed1e3f7b4e5870b870b91e73bd509313b2deb8f9..efe66d996f5e71059bc0dc38e7f5268caa85881b 100644 (file)
@@ -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;