-/* -*- 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.
* Author: Fan Yong <fanyong@clusterfs.com>
*/
-#ifndef EXPORT_SYMTAB
-#define EXPORT_SYMTAB
-#endif
#define DEBUG_SUBSYSTEM S_MDS
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h>
-#endif
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <libcfs/libcfs.h>
+#include <libcfs/lucache.h>
#include <obd.h>
#include <obd_class.h>
#include <obd_support.h>
#include <lustre_dlm.h>
#include <lustre_sec.h>
#include <lustre_lib.h>
-#include <lustre_ucache.h>
#include "mdt_internal.h"
ENTRY;
if (exp_connect_rmtclient(exp)) {
- cfs_down(&med->med_idmap_sem);
+ cfs_mutex_lock(&med->med_idmap_mutex);
if (!med->med_idmap)
med->med_idmap = lustre_idmap_init();
- cfs_up(&med->med_idmap_sem);
+ cfs_mutex_unlock(&med->med_idmap_mutex);
if (IS_ERR(med->med_idmap)) {
long err = PTR_ERR(med->med_idmap);
void mdt_cleanup_idmap(struct mdt_export_data *med)
{
- cfs_down(&med->med_idmap_sem);
+ cfs_mutex_lock(&med->med_idmap_mutex);
if (med->med_idmap != NULL) {
lustre_idmap_fini(med->med_idmap);
med->med_idmap = NULL;
}
- cfs_up(&med->med_idmap_sem);
+ cfs_mutex_unlock(&med->med_idmap_mutex);
}
static inline void mdt_revoke_export_locks(struct obd_export *exp)