Whamcloud - gitweb
LU-16056 libcfs: restore umask handling in kernel threads
[fs/lustre-release.git] / lustre / obdclass / llog.c
index 1af4ae5..79f89fe 100644 (file)
@@ -42,6 +42,7 @@
 
 #define DEBUG_SUBSYSTEM S_LOG
 
+#include <linux/fs_struct.h>
 #include <linux/pid_namespace.h>
 #include <linux/kthread.h>
 #include <llog_swab.h>
@@ -836,6 +837,7 @@ static int llog_process_thread_daemonize(void *arg)
        }
        task_unlock(lpi->lpi_reftask);
 
+       unshare_fs_struct();
        /* client env has no keys, tags is just 0 */
        rc = lu_env_init(&env, LCT_LOCAL | LCT_MG_THREAD);
        if (rc)