Message ID | 1441371213-3543-2-git-send-email-deathsimple@vodafone.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/fs/file_table.c b/fs/file_table.c index 294174d..23b797d 100644 --- a/fs/file_table.c +++ b/fs/file_table.c @@ -136,6 +136,7 @@ struct file *get_empty_filp(void) spin_lock_init(&f->f_lock); mutex_init(&f->f_pos_lock); eventpoll_init_file(f); + atomic_long_set(&f->f_oom_badness, 0); /* f->f_version: 0 */ return f; diff --git a/include/linux/fs.h b/include/linux/fs.h index 35ec87e..5a5d20a 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -861,6 +861,7 @@ struct file { struct list_head f_tfile_llink; #endif /* #ifdef CONFIG_EPOLL */ struct address_space *f_mapping; + atomic_long_t f_oom_badness; } __attribute__((aligned(4))); /* lest something weird decides that 2 is OK */ struct file_handle {