Whamcloud - gitweb
LU-1199 ldiskfs: Remove HAVE_{EXT4,JBD2}_JOURNAL_CALLBACK_{SET,ADD}
[fs/lustre-release.git] / lustre / target / tgt_lastrcvd.c
index d6a2b21..259c470 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, 2012, Whamcloud, Inc.
+ * Copyright (c) 2011, 2012, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -455,7 +455,7 @@ int tgt_last_commit_cb_add(struct thandle *th, struct lu_target *tgt,
                OBD_FREE_PTR(ccb);
        }
 
-       if ((exp->exp_connect_flags & OBD_CONNECT_LIGHTWEIGHT) != 0)
+       if (exp_connect_flags(exp) & OBD_CONNECT_LIGHTWEIGHT)
                /* report failure to force synchronous operation */
                return -EPERM;
 
@@ -535,7 +535,7 @@ int tgt_client_new(const struct lu_env *env, struct obd_export *exp)
 
        mutex_init(&ted->ted_lcd_lock);
 
-       if ((exp->exp_connect_flags & OBD_CONNECT_LIGHTWEIGHT) != 0)
+       if (exp_connect_flags(exp) & OBD_CONNECT_LIGHTWEIGHT)
                RETURN(0);
 
        /* the bitmap operations can handle cl_idx > sizeof(long) * 8, so
@@ -599,7 +599,7 @@ int tgt_client_add(const struct lu_env *env,  struct obd_export *exp, int idx)
        LASSERTF(idx >= 0, "%d\n", idx);
 
        if (!strcmp(ted->ted_lcd->lcd_uuid, tgt->lut_obd->obd_uuid.uuid) ||
-           (exp->exp_connect_flags & OBD_CONNECT_LIGHTWEIGHT) != 0)
+           exp_connect_flags(exp) & OBD_CONNECT_LIGHTWEIGHT)
                RETURN(0);
 
        if (test_and_set_bit(idx, tgt->lut_client_bitmap)) {
@@ -636,7 +636,7 @@ int tgt_client_del(const struct lu_env *env, struct obd_export *exp)
        /* XXX if lcd_uuid were a real obd_uuid, I could use obd_uuid_equals */
        if (!strcmp((char *)ted->ted_lcd->lcd_uuid,
                    (char *)tgt->lut_obd->obd_uuid.uuid) ||
-           (exp->exp_connect_flags & OBD_CONNECT_LIGHTWEIGHT) != 0)
+           exp_connect_flags(exp) & OBD_CONNECT_LIGHTWEIGHT)
                RETURN(0);
 
        CDEBUG(D_INFO, "%s: del client at idx %u, off %lld, UUID '%s'\n",