Whamcloud - gitweb
LU-7091 mdd: refresh nlink after update linkea
[fs/lustre-release.git] / lustre / ptlrpc / sec_ctx.c
index 34d1afc..1873e7a 100644 (file)
  *
  * GPL HEADER END
  */
-#ifdef __KERNEL__
+/*
+ * Copyright (c) 2014, Intel Corporation.
+ */
 
 #define DEBUG_SUBSYSTEM S_FILTER
 
 #include <linux/fs.h>
 #include <libcfs/libcfs.h>
 #include <lvfs.h>
+#include <obd_class.h>
+
+#include "ptlrpc_internal.h"
 
 /* refine later and change to seqlock or simlar from libcfs */
 /* Debugging check only needed during development */
@@ -53,8 +58,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(d_count(current->fs->pwd.dentry));
-       LASSERT(d_count(new_ctx->pwd));
+       LASSERT(ll_d_count(current->fs->pwd.dentry));
+       LASSERT(ll_d_count(new_ctx->pwd));
        save->pwd = dget(current->fs->pwd.dentry);
        save->pwdmnt = mntget(current->fs->pwd.mnt);
        save->umask = current_umask();
@@ -123,4 +128,3 @@ put_old:
        dput(dchild_old);
        RETURN(err);
 }
-#endif /* __KERNEL__ */