Whamcloud - gitweb
LU-2515 quota: handle OBD_QC_CALLBACK for interoperability
[fs/lustre-release.git] / lustre / lmv / lmv_intent.c
index 3a0063d..8cac14e 100644 (file)
@@ -34,9 +34,6 @@
  * 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>
@@ -65,7 +62,7 @@ int lmv_intent_remote(struct obd_export *exp, 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 lmv_obd         *lmv = &obd->u.lmv;
@@ -161,7 +158,7 @@ int lmv_intent_open(struct obd_export *exp, struct md_op_data *op_data,
                     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;
@@ -346,7 +343,7 @@ int lmv_intent_lookup(struct obd_export *exp, struct md_op_data *op_data,
                       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;
@@ -510,7 +507,7 @@ int lmv_intent_lock(struct obd_export *exp, struct md_op_data *op_data,
                     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;
@@ -543,7 +540,7 @@ int lmv_intent_lock(struct obd_export *exp, struct md_op_data *op_data,
 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;
@@ -580,8 +577,10 @@ int lmv_revalidate_slaves(struct obd_export *exp, struct ptlrpc_request **reqp,
          * 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;