/* Journalling filesystem info: */
void *journal_info;
+/* BLOG support - max modules defined here for use by other headers */
+#define BLOG_MAX_MODULES 8
+
+#if defined(CONFIG_BLOG) || defined(CONFIG_BLOG_MODULE)
+ struct blog_tls_ctx *blog_contexts[BLOG_MAX_MODULES];
+ u8 blog_ctx_bitmap;
+#endif
+
/* Stacked block device info: */
struct bio_list *bio_list;
#include <linux/sched/cputime.h>
#include <linux/sched/ext.h>
#include <linux/seq_file.h>
+#if defined(CONFIG_BLOG) || defined(CONFIG_BLOG_MODULE)
+#include <linux/blog/blog.h>
+#endif
#include <linux/rtmutex.h>
#include <linux/init.h>
#include <linux/unistd.h>
return kmem_cache_alloc_node(task_struct_cachep, GFP_KERNEL, node);
}
+struct tls_storage {
+ void (*release)(void *state);
+};
+
static inline void free_task_struct(struct task_struct *tsk)
{
+/*
+ if (tsk->tls.release) {
+ tsk->tls.release(tsk->tls.state);
+ tsk->tls.state = NULL;
+ tsk->tls.release = NULL;
+ }
+*/
+#if defined(CONFIG_BLOG) || defined(CONFIG_BLOG_MODULE)
+ /* Clean up any BLOG contexts */
+ {
+ int i;
+ for (i = 0; i < BLOG_MAX_MODULES; i++) {
+ if (tsk->blog_contexts[i]) {
+ struct blog_tls_ctx *ctx = tsk->blog_contexts[i];
+ if (ctx->release)
+ ctx->release(ctx);
+ tsk->blog_contexts[i] = NULL;
+ }
+ }
+ tsk->blog_ctx_bitmap = 0;
+ }
+#endif
kmem_cache_free(task_struct_cachep, tsk);
}
p = dup_task_struct(current, node);
if (!p)
goto fork_out;
+
+#if defined(CONFIG_BLOG) || defined(CONFIG_BLOG_MODULE)
+ /* Initialize BLOG contexts */
+ {
+ int i;
+ for (i = 0; i < BLOG_MAX_MODULES; i++)
+ p->blog_contexts[i] = NULL;
+ p->blog_ctx_bitmap = 0;
+ }
+#endif
+
p->flags &= ~PF_KTHREAD;
if (args->kthread)
p->flags |= PF_KTHREAD;