Whamcloud - gitweb
LU-1581 build: remove false ldiskfs dependencies
[fs/lustre-release.git] / lustre / mdd / mdd_permission.c
index 80e5e83..21e1659 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.
@@ -26,7 +24,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright  2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  */
 /*
  * Author: fangyong@clusterfs.com
  * Author: lsy@clusterfs.com
  */
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
+
 #define DEBUG_SUBSYSTEM S_MDS
 
-#include <linux/module.h>
-#include <linux/jbd.h>
-#include <obd.h>
 #include <obd_class.h>
 #include <lustre_ver.h>
-#include <obd_support.h>
 #include <lprocfs_status.h>
-
-#include <linux/ldiskfs_fs.h>
 #include <lustre_mds.h>
-#include <lustre/lustre_idl.h>
 
 #include "mdd_internal.h"
 
@@ -386,7 +375,7 @@ int mdd_capa_get(const struct lu_env *env, struct md_object *obj,
                           capa->lc_opc);
         if (IS_ERR(oc)) {
                 rc = PTR_ERR(oc);
-        } else {
+        } else if (likely(oc != NULL)) {
                 capa_cpy(capa, oc);
                 capa_put(oc);
         }