Linux: Fix build with CONFIG_UIDGID_STRICT_TYPE_CHECKS (user namespaces)
[openafs.git] / src / afs / LINUX / osi_module.c
index f5d6afc..2cc0e48 100644 (file)
@@ -42,12 +42,20 @@ DECLARE_MUTEX(afs_global_lock);
 #endif
 int afs_global_owner = 0;
 
+#ifdef HAVE_LINUX_KUID_T
+struct user_namespace *afs_ns;
+#endif
+
 int __init
 afs_init(void)
 {
     int err;
     AFS_RWLOCK_INIT(&afs_xosi, "afs_xosi");
 
+#ifdef HAVE_LINUX_KUID_T
+    afs_ns = afs_current_user_ns();
+#endif
+
     osi_Init();
 #if !defined(AFS_NONFSTRANS)
     osi_linux_nfssrv_init();