Whamcloud - gitweb
LU-1581 utils: introduce osd_init() wrapper
[fs/lustre-release.git] / lustre / lvfs / lvfs_linux.c
index ece23b4..6573f35 100644 (file)
  * Author: Andreas Dilger <adilger@clusterfs.com>
  */
 
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-
 #define DEBUG_SUBSYSTEM S_FILTER
 
 #include <linux/version.h>
@@ -67,6 +63,7 @@
 __u64 obd_max_pages = 0;
 __u64 obd_max_alloc = 0;
 struct lprocfs_stats *obd_memory = NULL;
+EXPORT_SYMBOL(obd_memory);
 cfs_spinlock_t obd_updatemax_lock = CFS_SPIN_LOCK_UNLOCKED;
 /* refine later and change to seqlock or simlar from libcfs */
 
@@ -125,8 +122,8 @@ void push_ctxt(struct lvfs_run_ctxt *save, struct lvfs_run_ctxt *new_ctx,
         OBD_SET_CTXT_MAGIC(save);
 
         save->fs = get_fs();
-        LASSERT(cfs_atomic_read(&cfs_fs_pwd(current->fs)->d_count));
-        LASSERT(cfs_atomic_read(&new_ctx->pwd->d_count));
+       LASSERT(d_refcount(cfs_fs_pwd(current->fs)));
+       LASSERT(d_refcount(new_ctx->pwd));
         save->pwd = dget(cfs_fs_pwd(current->fs));
         save->pwdmnt = mntget(cfs_fs_mnt(current->fs));
         save->luc.luc_umask = cfs_curproc_umask();
@@ -486,7 +483,6 @@ out:
 }
 EXPORT_SYMBOL(simple_truncate);
 
-#ifdef LUSTRE_KERNEL_VERSION
 int __lvfs_set_rdonly(lvfs_sbdev_type dev, lvfs_sbdev_type jdev)
 {
 #ifdef HAVE_DEV_SET_RDONLY
@@ -536,7 +532,6 @@ int lvfs_check_io_health(struct obd_device *obd, struct file *file)
         RETURN(rc);
 }
 EXPORT_SYMBOL(lvfs_check_io_health);
-#endif /* LUSTRE_KERNEL_VERSION */
 
 void obd_update_maxusage()
 {
@@ -553,6 +548,7 @@ void obd_update_maxusage()
         cfs_spin_unlock(&obd_updatemax_lock);
 
 }
+EXPORT_SYMBOL(obd_update_maxusage);
 
 __u64 obd_memory_max(void)
 {
@@ -564,6 +560,7 @@ __u64 obd_memory_max(void)
 
         return ret;
 }
+EXPORT_SYMBOL(obd_memory_max);
 
 __u64 obd_pages_max(void)
 {
@@ -575,11 +572,7 @@ __u64 obd_pages_max(void)
 
         return ret;
 }
-
-EXPORT_SYMBOL(obd_update_maxusage);
 EXPORT_SYMBOL(obd_pages_max);
-EXPORT_SYMBOL(obd_memory_max);
-EXPORT_SYMBOL(obd_memory);
 
 #ifdef LPROCFS
 __s64 lprocfs_read_helper(struct lprocfs_counter *lc,