-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* GPL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright (c) 2011, Whamcloud, Inc.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
#include <fcntl.h>
#include <sys/queue.h>
-#include <sysio.h>
-#ifdef HAVE_XTIO_H
-#include <xtio.h>
-#endif
-#include <fs.h>
-#include <mount.h>
-#include <inode.h>
-#ifdef HAVE_FILE_H
-#include <file.h>
-#endif
-
-#undef LIST_HEAD
-
#include "llite_lib.h"
void ll_intent_drop_lock(struct lookup_intent *it)
sbi = llu_i2sbi(inode);
md_set_lock_data(sbi->ll_md_exp,
- &it->d.lustre.it_lock_handle, inode);
+ &it->d.lustre.it_lock_handle, inode, NULL);
}
/* drop lookup/getattr locks */
struct lookup_intent *it)
{
struct pnode_base *pb = pnode->p_base;
- struct it_cb_data icbd;
struct md_op_data op_data = {{ 0 }};
struct ptlrpc_request *req = NULL;
struct lookup_intent lookup_it = { .it_op = IT_LOOKUP };
}
exp = llu_i2mdexp(pb->pb_ino);
- icbd.icbd_parent = pnode->p_parent->p_base->pb_ino;
- icbd.icbd_child = pnode;
if (!it) {
it = &lookup_it;
if (it_disposition(it, DISP_OPEN_CREATE) &&
!it_open_error(DISP_OPEN_CREATE, it)) {
LASSERT(request);
- LASSERT(atomic_read(&request->rq_refcount) > 1);
+ LASSERT(cfs_atomic_read(&request->rq_refcount) > 1);
CDEBUG(D_INODE, "dec a ref of req %p\n", request);
ptlrpc_req_finished(request);
}
if (md.lsm != NULL)
obd_free_memmd(sbi->ll_dt_exp, &md.lsm);
RETURN(inode ? PTR_ERR(inode) : -ENOMEM);
- } else if (md.lsm != NULL &&
- llu_i2info(inode)->lli_smd != md.lsm) {
+ } else if (md.lsm != NULL) {
obd_free_memmd(sbi->ll_dt_exp, &md.lsm);
}
/* If this is a stat, get the authoritative file size */
if (it->it_op == IT_GETATTR && S_ISREG(st->st_mode) &&
- lli->lli_smd != NULL) {
- struct lov_stripe_md *lsm = lli->lli_smd;
+ lli->lli_has_smd) {
ldlm_error_t rc;
- LASSERT(lsm->lsm_object_id != 0);
-
/* bug 2334: drop MDS lock before acquiring OST lock */
ll_intent_drop_lock(it);