}
/* drop lookup/getattr locks */
- if (it->it_op == IT_LOOKUP || it->it_op == IT_GETATTR)
+ if (it->it_op & (IT_LOOKUP | IT_GETATTR))
ll_intent_release(it);
}
/* conform to kernel code, if only IT_LOOKUP was set, don't
* pass down it */
- if (!it->it_op || it->it_op == IT_LOOKUP) {
+ if (!it->it_op || it->it_op & IT_LOOKUP) {
OBD_FREE(it, sizeof(*it));
it = NULL;
}
}
/* drop lookup or getattr locks immediately */
- if (it->it_op == IT_LOOKUP || it->it_op == IT_GETATTR) {
+ if (it->it_op & (IT_LOOKUP | IT_GETATTR)) {
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
/* on 2.6 there are situation when several lookups and
* revalidations may be requested during single operation.
* oh, MDS reports that this is remote inode case i.e. we have to ask
* for real attrs on another MDS.
*/
- if (it->it_op == IT_LOOKUP/* || it->it_op == IT_CHDIR*/) {
+ if (it->it_op & IT_LOOKUP/* || it->it_op & IT_CHDIR*/) {
/*
* unfortunately, we have to lie to MDC/MDS to retrieve
* attributes llite needs.
if (rc)
RETURN(rc);
- if (it->it_op == IT_LOOKUP)
+ if (it->it_op & IT_LOOKUP)
rc = lmv_intent_lookup(exp, pid, name, len, lmm,
lmmsize, cid, it, flags, reqp,
cb_blocking, extra_lock_flags);
rc = lmv_intent_open(exp, pid, name, len, lmm,
lmmsize, cid, it, flags, reqp,
cb_blocking, extra_lock_flags);
- else if (it->it_op == IT_GETATTR/* || it->it_op == IT_CHDIR*/)
+ else if (it->it_op & IT_GETATTR/* || it->it_op & IT_CHDIR*/)
rc = lmv_intent_getattr(exp, pid, name, len, lmm,
lmmsize, cid, it, flags, reqp,
cb_blocking, extra_lock_flags);
ldlm_it2str(it->it_op), it->it_flags);
if (fid_is_sane(&op_data->fid2) &&
- (it->it_op == IT_LOOKUP || it->it_op == IT_GETATTR)) {
+ (it->it_op & (IT_LOOKUP | IT_GETATTR))) {
/* We could just return 1 immediately, but since we should only
* be called in revalidate_it if we already have a lock, let's
* verify that. */