Whamcloud - gitweb
LU-1434 utils: Update Makefile to work out of the box
[fs/lustre-release.git] / lustre / ptlrpc / gss / gss_cli_upcall.c
index 603ef81..c5d7348 100644 (file)
@@ -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.
@@ -40,9 +38,6 @@
  * Author: Eric Mei <ericm@clusterfs.com>
  */
 
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
 #define DEBUG_SUBSYSTEM S_SEC
 #ifdef __KERNEL__
 #include <linux/init.h>
@@ -282,30 +277,30 @@ int gss_do_ctx_init_rpc(__user char *buffer, unsigned long count)
                 RETURN(-EINVAL);
         }
 
-        cfs_spin_lock(&obd->obd_dev_lock);
-        if (obd->obd_stopping) {
-                CERROR("obd %s has stopped\n", obdname);
-                cfs_spin_unlock(&obd->obd_dev_lock);
-                RETURN(-EINVAL);
-        }
-
-        if (strcmp(obd->obd_type->typ_name, LUSTRE_MDC_NAME) &&
-            strcmp(obd->obd_type->typ_name, LUSTRE_OSC_NAME) &&
-            strcmp(obd->obd_type->typ_name, LUSTRE_MGC_NAME)) {
-                CERROR("obd %s is not a client device\n", obdname);
-                cfs_spin_unlock(&obd->obd_dev_lock);
-                RETURN(-EINVAL);
-        }
-        cfs_spin_unlock(&obd->obd_dev_lock);
-
-        cfs_down_read(&obd->u.cli.cl_sem);
-        if (obd->u.cli.cl_import == NULL) {
-                CERROR("obd %s: import has gone\n", obd->obd_name);
-                cfs_up_read(&obd->u.cli.cl_sem);
-                RETURN(-EINVAL);
-        }
-        imp = class_import_get(obd->u.cli.cl_import);
-        cfs_up_read(&obd->u.cli.cl_sem);
+       spin_lock(&obd->obd_dev_lock);
+       if (obd->obd_stopping) {
+               CERROR("obd %s has stopped\n", obdname);
+               spin_unlock(&obd->obd_dev_lock);
+               RETURN(-EINVAL);
+       }
+
+       if (strcmp(obd->obd_type->typ_name, LUSTRE_MDC_NAME) &&
+           strcmp(obd->obd_type->typ_name, LUSTRE_OSC_NAME) &&
+           strcmp(obd->obd_type->typ_name, LUSTRE_MGC_NAME)) {
+               CERROR("obd %s is not a client device\n", obdname);
+               spin_unlock(&obd->obd_dev_lock);
+               RETURN(-EINVAL);
+       }
+       spin_unlock(&obd->obd_dev_lock);
+
+       down_read(&obd->u.cli.cl_sem);
+       if (obd->u.cli.cl_import == NULL) {
+               CERROR("obd %s: import has gone\n", obd->obd_name);
+               up_read(&obd->u.cli.cl_sem);
+               RETURN(-EINVAL);
+       }
+       imp = class_import_get(obd->u.cli.cl_import);
+       up_read(&obd->u.cli.cl_sem);
 
         if (imp->imp_deactive) {
                 CERROR("import has been deactivated\n");