Whamcloud - gitweb
LU-2607 mdd: preserve input arguments in mdd_create()
[fs/lustre-release.git] / lustre / lov / lov_ea.c
old mode 100755 (executable)
new mode 100644 (file)
index 8ab2ca7..34ab86d
@@ -1,6 +1,4 @@
-/* -*- 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.
@@ -29,7 +27,7 @@
  * Copyright (c) 2007, 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/
@@ -40,9 +38,6 @@
  * Author: Wang Di <wangdi@clusterfs.com>
  */
 
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
 #define DEBUG_SUBSYSTEM S_LOV
 
 #ifdef __KERNEL__
@@ -55,7 +50,6 @@
 #include <obd_class.h>
 #include <obd_lov.h>
 #include <lustre/lustre_idl.h>
-#include <lustre_log.h>
 
 #include "lov_internal.h"
 
@@ -187,16 +181,16 @@ static void lov_tgt_maxbytes(struct lov_tgt_desc *tgt, __u64 *stripe_maxbytes)
                 return;
         }
 
-        cfs_spin_lock(&imp->imp_lock);
-        if (imp->imp_state == LUSTRE_IMP_FULL &&
-           (imp->imp_connect_data.ocd_connect_flags & OBD_CONNECT_MAXBYTES) &&
-           imp->imp_connect_data.ocd_maxbytes > 0) {
-                if (*stripe_maxbytes > imp->imp_connect_data.ocd_maxbytes)
-                        *stripe_maxbytes = imp->imp_connect_data.ocd_maxbytes;
-        } else {
-                *stripe_maxbytes = LUSTRE_STRIPE_MAXBYTES;
-        }
-        cfs_spin_unlock(&imp->imp_lock);
+       spin_lock(&imp->imp_lock);
+       if (imp->imp_state == LUSTRE_IMP_FULL &&
+           (imp->imp_connect_data.ocd_connect_flags & OBD_CONNECT_MAXBYTES) &&
+           imp->imp_connect_data.ocd_maxbytes > 0) {
+               if (*stripe_maxbytes > imp->imp_connect_data.ocd_maxbytes)
+                       *stripe_maxbytes = imp->imp_connect_data.ocd_maxbytes;
+       } else {
+               *stripe_maxbytes = LUSTRE_STRIPE_MAXBYTES;
+       }
+       spin_unlock(&imp->imp_lock);
 }
 
 static int lsm_lmm_verify_v1(struct lov_mds_md_v1 *lmm, int lmm_bytes,