If lock_mode is not set then ensure that it_lock_bits has
the MDS_INODELOCK_OPEN bit set
Fixes:
5db0e2de00 ("LU-7403 llite: flatten struct lookup_intent")
HPE-bug-id: LUS-9198
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Icccaa59cd5b47a7d3f97569a452f34b33e905409
Reviewed-on: https://review.whamcloud.com/39797
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yingjin Qian <qian@ddn.com>
/* already get lease, handle lease lock */
ll_set_lock_data(sbi->ll_md_exp, inode, &it, NULL);
- if (it.it_lock_mode == 0 ||
- it.it_lock_bits != MDS_INODELOCK_OPEN) {
+ if (!it.it_lock_mode ||
+ !(it.it_lock_bits & MDS_INODELOCK_OPEN)) {
/* open lock must return for lease */
CERROR(DFID "lease granted but no open lock, %d/%llu.\n",
PFID(ll_inode2fid(inode)), it.it_lock_mode,