-/* -*- 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) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright (c) 2011, 2012, Whamcloud, Inc.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Sun Microsystems, Inc.
*/
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
#define DEBUG_SUBSYSTEM S_LMV
#ifdef __KERNEL__
#include <linux/slab.h>
#include <asm/div64.h>
#include <linux/seq_file.h>
#include <linux/namei.h>
-# ifndef HAVE_VFS_INTENT_PATCHES
-# include <linux/lustre_intent.h>
-# endif
+#include <linux/lustre_intent.h>
#else
#include <liblustre.h>
#endif
-#include <lustre/lustre_idl.h>
#include <obd_support.h>
+#include <lustre/lustre_idl.h>
#include <lustre_lib.h>
#include <lustre_net.h>
#include <lustre_dlm.h>
int lmmsize, struct lookup_intent *it,
int flags, struct ptlrpc_request **reqp,
ldlm_blocking_callback cb_blocking,
- int extra_lock_flags)
+ __u64 extra_lock_flags)
{
struct obd_device *obd = exp->exp_obd;
struct lmv_obd *lmv = &obd->u.lmv;
void *lmm, int lmmsize, struct lookup_intent *it,
int flags, struct ptlrpc_request **reqp,
ldlm_blocking_callback cb_blocking,
- int extra_lock_flags)
+ __u64 extra_lock_flags)
{
struct obd_device *obd = exp->exp_obd;
struct lu_fid rpid = op_data->op_fid1;
void *lmm, int lmmsize, struct lookup_intent *it,
int flags, struct ptlrpc_request **reqp,
ldlm_blocking_callback cb_blocking,
- int extra_lock_flags)
+ __u64 extra_lock_flags)
{
struct obd_device *obd = exp->exp_obd;
struct lu_fid rpid = op_data->op_fid1;
void *lmm, int lmmsize, struct lookup_intent *it,
int flags, struct ptlrpc_request **reqp,
ldlm_blocking_callback cb_blocking,
- int extra_lock_flags)
+ __u64 extra_lock_flags)
{
struct obd_device *obd = exp->exp_obd;
int rc;
if (rc)
RETURN(rc);
- if (it->it_op & (IT_LOOKUP | IT_GETATTR))
+ if (it->it_op & (IT_LOOKUP | IT_GETATTR | IT_LAYOUT))
rc = lmv_intent_lookup(exp, op_data, lmm, lmmsize, it,
flags, reqp, cb_blocking,
extra_lock_flags);
int lmv_revalidate_slaves(struct obd_export *exp, struct ptlrpc_request **reqp,
const struct lu_fid *mid, struct lookup_intent *oit,
int master_valid, ldlm_blocking_callback cb_blocking,
- int extra_lock_flags)
+ __u64 extra_lock_flags)
{
struct obd_device *obd = exp->exp_obd;
struct lmv_obd *lmv = &obd->u.lmv;
* cached all the time.
*/
obj = lmv_object_find_lock(obd, mid);
- if (obj == NULL)
- RETURN(-EALREADY);
+ if (obj == NULL) {
+ OBD_FREE_PTR(op_data);
+ RETURN(-EALREADY);
+ }
for (i = 0; i < obj->lo_objcount; i++) {
fid = obj->lo_stripes[i].ls_fid;