*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
*
* GPL HEADER END
*/
* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 2015, Intel Corporation.
+ * Copyright (c) 2011, 2016, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
if (pmode) {
plock.cookie = it->it_lock_handle;
it->it_lock_mode = 0;
- it->it_data = NULL;
+ it->it_request = NULL;
}
LASSERT(fid_is_sane(&body->mbo_fid1));
LTIME_S(inode->i_mtime) = body->mbo_mtime;
}
- md_set_lock_data(tgt->ltd_exp, &lockh->cookie, inode, NULL);
+ md_set_lock_data(tgt->ltd_exp, lockh, inode, NULL);
if (it.it_lock_mode != 0 && lockh != NULL) {
ldlm_lock_decref(lockh, it.it_lock_mode);
it.it_lock_mode = 0;
/* release the previous request */
ptlrpc_req_finished(*reqp);
- it->it_data = NULL;
+ it->it_request = NULL;
*reqp = NULL;
oinfo = &lsm->lsm_md_oinfo[stripe_index];
}
}
+ if (!it_has_reply_body(it))
+ RETURN(0);
+
/*
* MDS has returned success. Probably name has been resolved in
* remote inode. Let's check this.
ldlm_blocking_callback cb_blocking,
__u64 extra_lock_flags)
{
- struct obd_device *obd = exp->exp_obd;
- int rc;
+ int rc;
ENTRY;
LASSERT(it != NULL);
(int)op_data->op_namelen, op_data->op_name,
PFID(&op_data->op_fid1));
- rc = lmv_check_connect(obd);
- if (rc)
- RETURN(rc);
-
- if (it->it_op & (IT_LOOKUP | IT_GETATTR | IT_LAYOUT))
+ if (it->it_op & (IT_LOOKUP | IT_GETATTR | IT_LAYOUT | IT_GETXATTR))
rc = lmv_intent_lookup(exp, op_data, it, reqp, cb_blocking,
extra_lock_flags);
else if (it->it_op & IT_OPEN)
if (it->it_lock_mode != 0) {
lock_handle.cookie = it->it_lock_handle;
- ldlm_lock_decref(&lock_handle,
- it->it_lock_mode);
+ ldlm_lock_decref_and_cancel(&lock_handle,
+ it->it_lock_mode);
}
it->it_lock_handle = 0;
if (it->it_remote_lock_mode != 0) {
lock_handle.cookie = it->it_remote_lock_handle;
- ldlm_lock_decref(&lock_handle,
- it->it_remote_lock_mode);
+ ldlm_lock_decref_and_cancel(&lock_handle,
+ it->it_remote_lock_mode);
}
it->it_remote_lock_handle = 0;