Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165712
b: refs/heads/master
c: 858f099
h: refs/heads/master
v: v3
  • Loading branch information
Alexey Dobriyan authored and Linus Torvalds committed Sep 24, 2009
1 parent e62e90e commit c8096eb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b873c2f34ecd4a5a69b41b852cbc365694541c5f
refs/heads/master: 858f09930b32c11b40fd0c5c467982ba09b10894
5 changes: 2 additions & 3 deletions trunk/include/linux/mm_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -259,11 +259,10 @@ struct mm_struct {
unsigned long flags; /* Must use atomic bitops to access the bits */

struct core_state *core_state; /* coredumping support */

/* aio bits */
#ifdef CONFIG_AIO
spinlock_t ioctx_lock;
struct hlist_head ioctx_list;

#endif
#ifdef CONFIG_MM_OWNER
/*
* "owner" points to a task that is regarded as the canonical
Expand Down
11 changes: 9 additions & 2 deletions trunk/kernel/fork.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,14 @@ __setup("coredump_filter=", coredump_filter_setup);

#include <linux/init_task.h>

static void mm_init_aio(struct mm_struct *mm)
{
#ifdef CONFIG_AIO
spin_lock_init(&mm->ioctx_lock);
INIT_HLIST_HEAD(&mm->ioctx_list);
#endif
}

static struct mm_struct * mm_init(struct mm_struct * mm, struct task_struct *p)
{
atomic_set(&mm->mm_users, 1);
Expand All @@ -447,10 +455,9 @@ static struct mm_struct * mm_init(struct mm_struct * mm, struct task_struct *p)
set_mm_counter(mm, file_rss, 0);
set_mm_counter(mm, anon_rss, 0);
spin_lock_init(&mm->page_table_lock);
spin_lock_init(&mm->ioctx_lock);
INIT_HLIST_HEAD(&mm->ioctx_list);
mm->free_area_cache = TASK_UNMAPPED_BASE;
mm->cached_hole_size = ~0UL;
mm_init_aio(mm);
mm_init_owner(mm, p);

if (likely(!mm_alloc_pgd(mm))) {
Expand Down

0 comments on commit c8096eb

Please sign in to comment.