diff --git a/[refs] b/[refs] index ee3ab7505f54..0bdaf6f4dd25 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9b6a3df372f0318bb0ffe37ac5f4610fb9bdb44d +refs/heads/master: a77e28c7e1dc1a6a035c7627d4a88ecf3ea09aea diff --git a/trunk/arch/powerpc/kernel/power7-pmu.c b/trunk/arch/powerpc/kernel/power7-pmu.c index 018d094d92f9..388cf57ad827 100644 --- a/trunk/arch/powerpc/kernel/power7-pmu.c +++ b/trunk/arch/powerpc/kernel/power7-pmu.c @@ -317,7 +317,7 @@ static int power7_generic_events[] = { */ static int power7_cache_events[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = { [C(L1D)] = { /* RESULT_ACCESS RESULT_MISS */ - [C(OP_READ)] = { 0xc880, 0x400f0 }, + [C(OP_READ)] = { 0x400f0, 0xc880 }, [C(OP_WRITE)] = { 0, 0x300f0 }, [C(OP_PREFETCH)] = { 0xd8b8, 0 }, }, @@ -327,8 +327,8 @@ static int power7_cache_events[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = { [C(OP_PREFETCH)] = { 0x408a, 0 }, }, [C(LL)] = { /* RESULT_ACCESS RESULT_MISS */ - [C(OP_READ)] = { 0x16080, 0x26080 }, - [C(OP_WRITE)] = { 0x16082, 0x26082 }, + [C(OP_READ)] = { 0x6080, 0x6084 }, + [C(OP_WRITE)] = { 0x6082, 0x6086 }, [C(OP_PREFETCH)] = { 0, 0 }, }, [C(DTLB)] = { /* RESULT_ACCESS RESULT_MISS */ diff --git a/trunk/arch/sparc/kernel/irq_64.c b/trunk/arch/sparc/kernel/irq_64.c index 8daab33fc17d..f0ee79055409 100644 --- a/trunk/arch/sparc/kernel/irq_64.c +++ b/trunk/arch/sparc/kernel/irq_64.c @@ -886,7 +886,7 @@ void notrace init_irqwork_curcpu(void) * Therefore you cannot make any OBP calls, not even prom_printf, * from these two routines. */ -static void __cpuinit notrace register_one_mondo(unsigned long paddr, unsigned long type, unsigned long qmask) +static void __cpuinit register_one_mondo(unsigned long paddr, unsigned long type, unsigned long qmask) { unsigned long num_entries = (qmask + 1) / 64; unsigned long status; diff --git a/trunk/arch/sparc/kernel/nmi.c b/trunk/arch/sparc/kernel/nmi.c index b75bf502cd42..2c0cc72d295b 100644 --- a/trunk/arch/sparc/kernel/nmi.c +++ b/trunk/arch/sparc/kernel/nmi.c @@ -103,7 +103,7 @@ notrace __kprobes void perfctr_irq(int irq, struct pt_regs *regs) } if (!touched && __get_cpu_var(last_irq_sum) == sum) { local_inc(&__get_cpu_var(alert_counter)); - if (local_read(&__get_cpu_var(alert_counter)) == 30 * nmi_hz) + if (local_read(&__get_cpu_var(alert_counter)) == 5 * nmi_hz) die_nmi("BUG: NMI Watchdog detected LOCKUP", regs, panic_on_timeout); } else { diff --git a/trunk/arch/sparc/prom/misc_64.c b/trunk/arch/sparc/prom/misc_64.c index 39fc6af21b7c..eedffb4fec2d 100644 --- a/trunk/arch/sparc/prom/misc_64.c +++ b/trunk/arch/sparc/prom/misc_64.c @@ -88,7 +88,7 @@ void prom_cmdline(void) /* Drop into the prom, but completely terminate the program. * No chance of continuing. */ -void notrace prom_halt(void) +void prom_halt(void) { #ifdef CONFIG_SUN_LDOMS if (ldom_domaining_enabled) diff --git a/trunk/arch/sparc/prom/printf.c b/trunk/arch/sparc/prom/printf.c index ca869266b9f3..660943ee4c2a 100644 --- a/trunk/arch/sparc/prom/printf.c +++ b/trunk/arch/sparc/prom/printf.c @@ -14,14 +14,14 @@ */ #include -#include #include #include static char ppbuf[1024]; -void notrace prom_write(const char *buf, unsigned int n) +void +prom_write(const char *buf, unsigned int n) { char ch; @@ -33,7 +33,8 @@ void notrace prom_write(const char *buf, unsigned int n) } } -void notrace prom_printf(const char *fmt, ...) +void +prom_printf(const char *fmt, ...) { va_list args; int i; diff --git a/trunk/drivers/char/n_tty.c b/trunk/drivers/char/n_tty.c index 4e28b35024ec..973be2f44195 100644 --- a/trunk/drivers/char/n_tty.c +++ b/trunk/drivers/char/n_tty.c @@ -300,7 +300,8 @@ static int do_output_char(unsigned char c, struct tty_struct *tty, int space) if (space < 2) return -1; tty->canon_column = tty->column = 0; - tty->ops->write(tty, "\r\n", 2); + tty_put_char(tty, '\r'); + tty_put_char(tty, c); return 2; } tty->canon_column = tty->column; diff --git a/trunk/drivers/char/pty.c b/trunk/drivers/char/pty.c index b33d6688e910..d083c73d784a 100644 --- a/trunk/drivers/char/pty.c +++ b/trunk/drivers/char/pty.c @@ -109,13 +109,21 @@ static int pty_space(struct tty_struct *to) * the other side of the pty/tty pair. */ -static int pty_write(struct tty_struct *tty, const unsigned char *buf, int c) +static int pty_write(struct tty_struct *tty, const unsigned char *buf, + int count) { struct tty_struct *to = tty->link; + int c; if (tty->stopped) return 0; + /* This isn't locked but our 8K is quite sloppy so no + big deal */ + + c = pty_space(to); + if (c > count) + c = count; if (c > 0) { /* Stuff the data into the input queue of the other end */ c = tty_insert_flip_string(to, buf, c); diff --git a/trunk/drivers/input/keyboard/atkbd.c b/trunk/drivers/input/keyboard/atkbd.c index 6c6a09b1c0fe..95fe0452dae4 100644 --- a/trunk/drivers/input/keyboard/atkbd.c +++ b/trunk/drivers/input/keyboard/atkbd.c @@ -879,14 +879,6 @@ static unsigned int atkbd_hp_zv6100_forced_release_keys[] = { 0xae, 0xb0, -1U }; -/* - * Perform fixup for HP (Compaq) Presario R4000 R4100 R4200 that don't generate - * release for their volume buttons - */ -static unsigned int atkbd_hp_r4000_forced_release_keys[] = { - 0xae, 0xb0, -1U -}; - /* * Samsung NC10,NC20 with Fn+F? key release not working */ @@ -1544,33 +1536,6 @@ static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = { .callback = atkbd_setup_forced_release, .driver_data = atkbd_hp_zv6100_forced_release_keys, }, - { - .ident = "HP Presario R4000", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), - DMI_MATCH(DMI_PRODUCT_NAME, "Presario R4000"), - }, - .callback = atkbd_setup_forced_release, - .driver_data = atkbd_hp_r4000_forced_release_keys, - }, - { - .ident = "HP Presario R4100", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), - DMI_MATCH(DMI_PRODUCT_NAME, "Presario R4100"), - }, - .callback = atkbd_setup_forced_release, - .driver_data = atkbd_hp_r4000_forced_release_keys, - }, - { - .ident = "HP Presario R4200", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), - DMI_MATCH(DMI_PRODUCT_NAME, "Presario R4200"), - }, - .callback = atkbd_setup_forced_release, - .driver_data = atkbd_hp_r4000_forced_release_keys, - }, { .ident = "Inventec Symphony", .matches = { diff --git a/trunk/drivers/input/serio/i8042-x86ia64io.h b/trunk/drivers/input/serio/i8042-x86ia64io.h index ccbf23ece8e3..ae04d8a494e5 100644 --- a/trunk/drivers/input/serio/i8042-x86ia64io.h +++ b/trunk/drivers/input/serio/i8042-x86ia64io.h @@ -382,14 +382,6 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "Vostro1510"), }, }, - { - .ident = "Acer Aspire 5536", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Acer"), - DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5536"), - DMI_MATCH(DMI_PRODUCT_VERSION, "0100"), - }, - }, { } }; diff --git a/trunk/drivers/md/dm.c b/trunk/drivers/md/dm.c index 8a311ea0d441..b4845b14740d 100644 --- a/trunk/drivers/md/dm.c +++ b/trunk/drivers/md/dm.c @@ -738,16 +738,22 @@ static void rq_completed(struct mapped_device *md, int run_queue) dm_put(md); } +static void free_rq_clone(struct request *clone) +{ + struct dm_rq_target_io *tio = clone->end_io_data; + + blk_rq_unprep_clone(clone); + free_rq_tio(tio); +} + static void dm_unprep_request(struct request *rq) { struct request *clone = rq->special; - struct dm_rq_target_io *tio = clone->end_io_data; rq->special = NULL; rq->cmd_flags &= ~REQ_DONTPREP; - blk_rq_unprep_clone(clone); - free_rq_tio(tio); + free_rq_clone(clone); } /* @@ -825,8 +831,7 @@ static void dm_end_request(struct request *clone, int error) rq->sense_len = clone->sense_len; } - BUG_ON(clone->bio); - free_rq_tio(tio); + free_rq_clone(clone); blk_end_request_all(rq, error); diff --git a/trunk/drivers/pci/iov.c b/trunk/drivers/pci/iov.c index e03fe98f0619..e3a87210e947 100644 --- a/trunk/drivers/pci/iov.c +++ b/trunk/drivers/pci/iov.c @@ -597,29 +597,6 @@ int pci_iov_resource_bar(struct pci_dev *dev, int resno, 4 * (resno - PCI_IOV_RESOURCES); } -/** - * pci_sriov_resource_alignment - get resource alignment for VF BAR - * @dev: the PCI device - * @resno: the resource number - * - * Returns the alignment of the VF BAR found in the SR-IOV capability. - * This is not the same as the resource size which is defined as - * the VF BAR size multiplied by the number of VFs. The alignment - * is just the VF BAR size. - */ -int pci_sriov_resource_alignment(struct pci_dev *dev, int resno) -{ - struct resource tmp; - enum pci_bar_type type; - int reg = pci_iov_resource_bar(dev, resno, &type); - - if (!reg) - return 0; - - __pci_read_base(dev, type, &tmp, reg); - return resource_alignment(&tmp); -} - /** * pci_restore_iov_state - restore the state of the IOV capability * @dev: the PCI device diff --git a/trunk/drivers/pci/pci.h b/trunk/drivers/pci/pci.h index 5ff4d25bf0e9..f73bcbedf37c 100644 --- a/trunk/drivers/pci/pci.h +++ b/trunk/drivers/pci/pci.h @@ -243,7 +243,6 @@ extern int pci_iov_init(struct pci_dev *dev); extern void pci_iov_release(struct pci_dev *dev); extern int pci_iov_resource_bar(struct pci_dev *dev, int resno, enum pci_bar_type *type); -extern int pci_sriov_resource_alignment(struct pci_dev *dev, int resno); extern void pci_restore_iov_state(struct pci_dev *dev); extern int pci_iov_bus_range(struct pci_bus *bus); @@ -299,16 +298,4 @@ static inline int pci_ats_enabled(struct pci_dev *dev) } #endif /* CONFIG_PCI_IOV */ -static inline int pci_resource_alignment(struct pci_dev *dev, - struct resource *res) -{ -#ifdef CONFIG_PCI_IOV - int resno = res - dev->resource; - - if (resno >= PCI_IOV_RESOURCES && resno <= PCI_IOV_RESOURCE_END) - return pci_sriov_resource_alignment(dev, resno); -#endif - return resource_alignment(res); -} - #endif /* DRIVERS_PCI_H */ diff --git a/trunk/drivers/pci/setup-bus.c b/trunk/drivers/pci/setup-bus.c index 7c443b4583ab..b636e245445d 100644 --- a/trunk/drivers/pci/setup-bus.c +++ b/trunk/drivers/pci/setup-bus.c @@ -25,7 +25,7 @@ #include #include #include -#include "pci.h" + static void pbus_assign_resources_sorted(const struct pci_bus *bus) { @@ -384,7 +384,7 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask, unsigned long continue; r_size = resource_size(r); /* For bridges size != alignment */ - align = pci_resource_alignment(dev, r); + align = resource_alignment(r); order = __ffs(align) - 20; if (order > 11) { dev_warn(&dev->dev, "BAR %d bad alignment %llx: " diff --git a/trunk/drivers/pci/setup-res.c b/trunk/drivers/pci/setup-res.c index 88cdd1a937d6..1898c7b47907 100644 --- a/trunk/drivers/pci/setup-res.c +++ b/trunk/drivers/pci/setup-res.c @@ -144,7 +144,7 @@ static int __pci_assign_resource(struct pci_bus *bus, struct pci_dev *dev, size = resource_size(res); min = (res->flags & IORESOURCE_IO) ? PCIBIOS_MIN_IO : PCIBIOS_MIN_MEM; - align = pci_resource_alignment(dev, res); + align = resource_alignment(res); /* First, try exact prefetching match.. */ ret = pci_bus_alloc_resource(bus, res, size, align, min, @@ -178,7 +178,7 @@ int pci_assign_resource(struct pci_dev *dev, int resno) struct pci_bus *bus; int ret; - align = pci_resource_alignment(dev, res); + align = resource_alignment(res); if (!align) { dev_info(&dev->dev, "BAR %d: can't allocate resource (bogus " "alignment) %pR flags %#lx\n", @@ -259,7 +259,7 @@ void pdev_sort_resources(struct pci_dev *dev, struct resource_list *head) if (!(r->flags) || r->parent) continue; - r_align = pci_resource_alignment(dev, r); + r_align = resource_alignment(r); if (!r_align) { dev_warn(&dev->dev, "BAR %d: bogus alignment " "%pR flags %#lx\n", @@ -271,7 +271,7 @@ void pdev_sort_resources(struct pci_dev *dev, struct resource_list *head) struct resource_list *ln = list->next; if (ln) - align = pci_resource_alignment(ln->dev, ln->res); + align = resource_alignment(ln->res); if (r_align > align) { tmp = kmalloc(sizeof(*tmp), GFP_KERNEL); diff --git a/trunk/fs/compat.c b/trunk/fs/compat.c index 6d6f98fe64a0..94502dab972a 100644 --- a/trunk/fs/compat.c +++ b/trunk/fs/compat.c @@ -1485,15 +1485,20 @@ int compat_do_execve(char * filename, if (!bprm) goto out_files; - retval = prepare_bprm_creds(bprm); - if (retval) + retval = -ERESTARTNOINTR; + if (mutex_lock_interruptible(¤t->cred_guard_mutex)) goto out_free; + current->in_execve = 1; + + retval = -ENOMEM; + bprm->cred = prepare_exec_creds(); + if (!bprm->cred) + goto out_unlock; retval = check_unsafe_exec(bprm); if (retval < 0) - goto out_free; + goto out_unlock; clear_in_exec = retval; - current->in_execve = 1; file = open_exec(filename); retval = PTR_ERR(file); @@ -1542,6 +1547,7 @@ int compat_do_execve(char * filename, /* execve succeeded */ current->fs->in_exec = 0; current->in_execve = 0; + mutex_unlock(¤t->cred_guard_mutex); acct_update_integrals(current); free_bprm(bprm); if (displaced) @@ -1561,7 +1567,10 @@ int compat_do_execve(char * filename, out_unmark: if (clear_in_exec) current->fs->in_exec = 0; + +out_unlock: current->in_execve = 0; + mutex_unlock(¤t->cred_guard_mutex); out_free: free_bprm(bprm); diff --git a/trunk/fs/exec.c b/trunk/fs/exec.c index 172ceb6edde4..fb4f3cdda78c 100644 --- a/trunk/fs/exec.c +++ b/trunk/fs/exec.c @@ -1015,35 +1015,6 @@ int flush_old_exec(struct linux_binprm * bprm) EXPORT_SYMBOL(flush_old_exec); -/* - * Prepare credentials and lock ->cred_guard_mutex. - * install_exec_creds() commits the new creds and drops the lock. - * Or, if exec fails before, free_bprm() should release ->cred and - * and unlock. - */ -int prepare_bprm_creds(struct linux_binprm *bprm) -{ - if (mutex_lock_interruptible(¤t->cred_guard_mutex)) - return -ERESTARTNOINTR; - - bprm->cred = prepare_exec_creds(); - if (likely(bprm->cred)) - return 0; - - mutex_unlock(¤t->cred_guard_mutex); - return -ENOMEM; -} - -void free_bprm(struct linux_binprm *bprm) -{ - free_arg_pages(bprm); - if (bprm->cred) { - mutex_unlock(¤t->cred_guard_mutex); - abort_creds(bprm->cred); - } - kfree(bprm); -} - /* * install the new credentials for this executable */ @@ -1053,13 +1024,12 @@ void install_exec_creds(struct linux_binprm *bprm) commit_creds(bprm->cred); bprm->cred = NULL; - /* - * cred_guard_mutex must be held at least to this point to prevent + + /* cred_guard_mutex must be held at least to this point to prevent * ptrace_attach() from altering our determination of the task's - * credentials; any time after this it may be unlocked. - */ + * credentials; any time after this it may be unlocked */ + security_bprm_committed_creds(bprm); - mutex_unlock(¤t->cred_guard_mutex); } EXPORT_SYMBOL(install_exec_creds); @@ -1276,6 +1246,14 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs) EXPORT_SYMBOL(search_binary_handler); +void free_bprm(struct linux_binprm *bprm) +{ + free_arg_pages(bprm); + if (bprm->cred) + abort_creds(bprm->cred); + kfree(bprm); +} + /* * sys_execve() executes a new program. */ @@ -1299,15 +1277,20 @@ int do_execve(char * filename, if (!bprm) goto out_files; - retval = prepare_bprm_creds(bprm); - if (retval) + retval = -ERESTARTNOINTR; + if (mutex_lock_interruptible(¤t->cred_guard_mutex)) goto out_free; + current->in_execve = 1; + + retval = -ENOMEM; + bprm->cred = prepare_exec_creds(); + if (!bprm->cred) + goto out_unlock; retval = check_unsafe_exec(bprm); if (retval < 0) - goto out_free; + goto out_unlock; clear_in_exec = retval; - current->in_execve = 1; file = open_exec(filename); retval = PTR_ERR(file); @@ -1357,6 +1340,7 @@ int do_execve(char * filename, /* execve succeeded */ current->fs->in_exec = 0; current->in_execve = 0; + mutex_unlock(¤t->cred_guard_mutex); acct_update_integrals(current); free_bprm(bprm); if (displaced) @@ -1376,7 +1360,10 @@ int do_execve(char * filename, out_unmark: if (clear_in_exec) current->fs->in_exec = 0; + +out_unlock: current->in_execve = 0; + mutex_unlock(¤t->cred_guard_mutex); out_free: free_bprm(bprm); diff --git a/trunk/fs/ext2/namei.c b/trunk/fs/ext2/namei.c index 78d9b925fc94..e1dedb0f7873 100644 --- a/trunk/fs/ext2/namei.c +++ b/trunk/fs/ext2/namei.c @@ -362,10 +362,6 @@ static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry, if (dir_de) { if (old_dir != new_dir) ext2_set_link(old_inode, dir_de, dir_page, new_dir, 0); - else { - kunmap(dir_page); - page_cache_release(dir_page); - } inode_dec_link_count(old_dir); } return 0; diff --git a/trunk/fs/ocfs2/aops.c b/trunk/fs/ocfs2/aops.c index 8a1e61545f41..b401654011a2 100644 --- a/trunk/fs/ocfs2/aops.c +++ b/trunk/fs/ocfs2/aops.c @@ -1747,8 +1747,8 @@ int ocfs2_write_begin_nolock(struct address_space *mapping, * we know zeros will only be needed in the first and/or last cluster. */ if (clusters_to_alloc || extents_to_split || - (wc->w_clen && (wc->w_desc[0].c_needs_zero || - wc->w_desc[wc->w_clen - 1].c_needs_zero))) + wc->w_desc[0].c_needs_zero || + wc->w_desc[wc->w_clen - 1].c_needs_zero) cluster_of_pages = 1; else cluster_of_pages = 0; diff --git a/trunk/fs/ocfs2/dcache.c b/trunk/fs/ocfs2/dcache.c index b4957c7d9fe2..2f28b7de2c8d 100644 --- a/trunk/fs/ocfs2/dcache.c +++ b/trunk/fs/ocfs2/dcache.c @@ -85,17 +85,6 @@ static int ocfs2_dentry_revalidate(struct dentry *dentry, goto bail; } - /* - * If the last lookup failed to create dentry lock, let us - * redo it. - */ - if (!dentry->d_fsdata) { - mlog(0, "Inode %llu doesn't have dentry lock, " - "returning false\n", - (unsigned long long)OCFS2_I(inode)->ip_blkno); - goto bail; - } - ret = 1; bail: diff --git a/trunk/include/linux/binfmts.h b/trunk/include/linux/binfmts.h index 2046b5b8af48..61ee18c1bdb4 100644 --- a/trunk/include/linux/binfmts.h +++ b/trunk/include/linux/binfmts.h @@ -117,7 +117,6 @@ extern int setup_arg_pages(struct linux_binprm * bprm, int executable_stack); extern int bprm_mm_init(struct linux_binprm *bprm); extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm); -extern int prepare_bprm_creds(struct linux_binprm *bprm); extern void install_exec_creds(struct linux_binprm *bprm); extern void do_coredump(long signr, int exit_code, struct pt_regs *regs); extern int set_binfmt(struct linux_binfmt *new); diff --git a/trunk/include/linux/workqueue.h b/trunk/include/linux/workqueue.h index 6273fa97b527..13e1adf55c4c 100644 --- a/trunk/include/linux/workqueue.h +++ b/trunk/include/linux/workqueue.h @@ -240,21 +240,6 @@ static inline int cancel_delayed_work(struct delayed_work *work) return ret; } -/* - * Like above, but uses del_timer() instead of del_timer_sync(). This means, - * if it returns 0 the timer function may be running and the queueing is in - * progress. - */ -static inline int __cancel_delayed_work(struct delayed_work *work) -{ - int ret; - - ret = del_timer(&work->timer); - if (ret) - work_clear_pending(&work->work); - return ret; -} - extern int cancel_delayed_work_sync(struct delayed_work *work); /* Obsolete. use cancel_delayed_work_sync() */ diff --git a/trunk/kernel/perf_counter.c b/trunk/kernel/perf_counter.c index d7cbc579fc80..f274e1959885 100644 --- a/trunk/kernel/perf_counter.c +++ b/trunk/kernel/perf_counter.c @@ -50,7 +50,7 @@ static atomic_t nr_task_counters __read_mostly; * 1 - disallow cpu counters to unpriv * 2 - disallow kernel profiling to unpriv */ -int sysctl_perf_counter_paranoid __read_mostly = 1; +int sysctl_perf_counter_paranoid __read_mostly; static inline bool perf_paranoid_cpu(void) { @@ -4066,7 +4066,6 @@ perf_counter_alloc(struct perf_counter_attr *attr, hwc->sample_period = attr->sample_period; if (attr->freq && attr->sample_freq) hwc->sample_period = 1; - hwc->last_period = hwc->sample_period; atomic64_set(&hwc->period_left, hwc->sample_period); diff --git a/trunk/mm/nommu.c b/trunk/mm/nommu.c index 66e81e7e9fe9..4bde489ec431 100644 --- a/trunk/mm/nommu.c +++ b/trunk/mm/nommu.c @@ -1352,7 +1352,6 @@ unsigned long do_mmap_pgoff(struct file *file, } vma->vm_region = region; - add_nommu_region(region); /* set up the mapping */ if (file && vma->vm_flags & VM_SHARED) @@ -1362,6 +1361,8 @@ unsigned long do_mmap_pgoff(struct file *file, if (ret < 0) goto error_put_region; + add_nommu_region(region); + /* okay... we have a mapping; now we have to register it */ result = vma->vm_start; diff --git a/trunk/mm/page_alloc.c b/trunk/mm/page_alloc.c index a0de15f46987..5cc986eb9f6f 100644 --- a/trunk/mm/page_alloc.c +++ b/trunk/mm/page_alloc.c @@ -817,15 +817,13 @@ __rmqueue_fallback(struct zone *zone, int order, int start_migratetype) * agressive about taking ownership of free pages */ if (unlikely(current_order >= (pageblock_order >> 1)) || - start_migratetype == MIGRATE_RECLAIMABLE || - page_group_by_mobility_disabled) { + start_migratetype == MIGRATE_RECLAIMABLE) { unsigned long pages; pages = move_freepages_block(zone, page, start_migratetype); /* Claim the whole block if over half of it is free */ - if (pages >= (1 << (pageblock_order-1)) || - page_group_by_mobility_disabled) + if (pages >= (1 << (pageblock_order-1))) set_pageblock_migratetype(page, start_migratetype);