diff --git a/[refs] b/[refs] index 9ff0494e86cd..8ee5a11bb165 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 847854f5988a04fe7e02d2fdd4fa0df9f96360fe +refs/heads/master: 30ce2f7eef095d1b8d070740f1948629814fe3c7 diff --git a/trunk/arch/arm/mach-omap2/mailbox.c b/trunk/arch/arm/mach-omap2/mailbox.c index a6db1e4f7b6e..609ea2ded7e3 100644 --- a/trunk/arch/arm/mach-omap2/mailbox.c +++ b/trunk/arch/arm/mach-omap2/mailbox.c @@ -412,8 +412,7 @@ static void __exit omap2_mbox_exit(void) platform_driver_unregister(&omap2_mbox_driver); } -/* must be ready before omap3isp is probed */ -subsys_initcall(omap2_mbox_init); +module_init(omap2_mbox_init); module_exit(omap2_mbox_exit); MODULE_LICENSE("GPL v2"); diff --git a/trunk/arch/openrisc/include/asm/ptrace.h b/trunk/arch/openrisc/include/asm/ptrace.h index e612ce4512c7..054537c5f9c9 100644 --- a/trunk/arch/openrisc/include/asm/ptrace.h +++ b/trunk/arch/openrisc/include/asm/ptrace.h @@ -77,6 +77,7 @@ struct pt_regs { long syscallno; /* Syscall number (used by strace) */ long dummy; /* Cheap alignment fix */ }; +#endif /* __ASSEMBLY__ */ /* TODO: Rename this to REDZONE because that's what it is */ #define STACK_FRAME_OVERHEAD 128 /* size of minimum stack frame */ @@ -86,13 +87,6 @@ struct pt_regs { #define user_stack_pointer(regs) ((unsigned long)(regs)->sp) #define profile_pc(regs) instruction_pointer(regs) -static inline long regs_return_value(struct pt_regs *regs) -{ - return regs->gpr[11]; -} - -#endif /* __ASSEMBLY__ */ - /* * Offsets used by 'ptrace' system call interface. */ diff --git a/trunk/arch/openrisc/kernel/init_task.c b/trunk/arch/openrisc/kernel/init_task.c index ca534082d5f3..45744a384927 100644 --- a/trunk/arch/openrisc/kernel/init_task.c +++ b/trunk/arch/openrisc/kernel/init_task.c @@ -17,7 +17,6 @@ #include #include -#include static struct signal_struct init_signals = INIT_SIGNALS(init_signals); static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); diff --git a/trunk/arch/openrisc/kernel/irq.c b/trunk/arch/openrisc/kernel/irq.c index 4bfead220956..59b302338331 100644 --- a/trunk/arch/openrisc/kernel/irq.c +++ b/trunk/arch/openrisc/kernel/irq.c @@ -23,7 +23,6 @@ #include #include #include -#include #include diff --git a/trunk/arch/openrisc/kernel/ptrace.c b/trunk/arch/openrisc/kernel/ptrace.c index 7259047d5f9d..656b94beab89 100644 --- a/trunk/arch/openrisc/kernel/ptrace.c +++ b/trunk/arch/openrisc/kernel/ptrace.c @@ -188,9 +188,11 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs) */ ret = -1L; - audit_syscall_entry(audit_arch(), regs->syscallno, - regs->gpr[3], regs->gpr[4], - regs->gpr[5], regs->gpr[6]); + /* Are these regs right??? */ + if (unlikely(current->audit_context)) + audit_syscall_entry(audit_arch(), regs->syscallno, + regs->gpr[3], regs->gpr[4], + regs->gpr[5], regs->gpr[6]); return ret ? : regs->syscallno; } @@ -199,7 +201,9 @@ asmlinkage void do_syscall_trace_leave(struct pt_regs *regs) { int step; - audit_syscall_exit(regs); + if (unlikely(current->audit_context)) + audit_syscall_exit(AUDITSC_RESULT(regs->gpr[11]), + regs->gpr[11]); step = test_thread_flag(TIF_SINGLESTEP); if (step || test_thread_flag(TIF_SYSCALL_TRACE)) diff --git a/trunk/drivers/iommu/omap-iommu-debug.c b/trunk/drivers/iommu/omap-iommu-debug.c index 103dbd92e256..288da5c1499d 100644 --- a/trunk/drivers/iommu/omap-iommu-debug.c +++ b/trunk/drivers/iommu/omap-iommu-debug.c @@ -44,8 +44,7 @@ static ssize_t debug_read_ver(struct file *file, char __user *userbuf, static ssize_t debug_read_regs(struct file *file, char __user *userbuf, size_t count, loff_t *ppos) { - struct device *dev = file->private_data; - struct omap_iommu *obj = dev_to_omap_iommu(dev); + struct omap_iommu *obj = file->private_data; char *p, *buf; ssize_t bytes; @@ -68,8 +67,7 @@ static ssize_t debug_read_regs(struct file *file, char __user *userbuf, static ssize_t debug_read_tlb(struct file *file, char __user *userbuf, size_t count, loff_t *ppos) { - struct device *dev = file->private_data; - struct omap_iommu *obj = dev_to_omap_iommu(dev); + struct omap_iommu *obj = file->private_data; char *p, *buf; ssize_t bytes, rest; @@ -99,8 +97,7 @@ static ssize_t debug_write_pagetable(struct file *file, struct iotlb_entry e; struct cr_regs cr; int err; - struct device *dev = file->private_data; - struct omap_iommu *obj = dev_to_omap_iommu(dev); + struct omap_iommu *obj = file->private_data; char buf[MAXCOLUMN], *p = buf; count = min(count, sizeof(buf)); @@ -187,8 +184,7 @@ static ssize_t dump_ioptable(struct omap_iommu *obj, char *buf, ssize_t len) static ssize_t debug_read_pagetable(struct file *file, char __user *userbuf, size_t count, loff_t *ppos) { - struct device *dev = file->private_data; - struct omap_iommu *obj = dev_to_omap_iommu(dev); + struct omap_iommu *obj = file->private_data; char *p, *buf; size_t bytes; @@ -216,8 +212,7 @@ static ssize_t debug_read_pagetable(struct file *file, char __user *userbuf, static ssize_t debug_read_mmap(struct file *file, char __user *userbuf, size_t count, loff_t *ppos) { - struct device *dev = file->private_data; - struct omap_iommu *obj = dev_to_omap_iommu(dev); + struct omap_iommu *obj = file->private_data; char *p, *buf; struct iovm_struct *tmp; int uninitialized_var(i); @@ -259,7 +254,7 @@ static ssize_t debug_read_mmap(struct file *file, char __user *userbuf, static ssize_t debug_read_mem(struct file *file, char __user *userbuf, size_t count, loff_t *ppos) { - struct device *dev = file->private_data; + struct omap_iommu *obj = file->private_data; char *p, *buf; struct iovm_struct *area; ssize_t bytes; @@ -273,8 +268,8 @@ static ssize_t debug_read_mem(struct file *file, char __user *userbuf, mutex_lock(&iommu_debug_lock); - area = omap_find_iovm_area(dev, (u32)ppos); - if (!area) { + area = omap_find_iovm_area(obj, (u32)ppos); + if (IS_ERR(area)) { bytes = -EINVAL; goto err_out; } @@ -292,7 +287,7 @@ static ssize_t debug_read_mem(struct file *file, char __user *userbuf, static ssize_t debug_write_mem(struct file *file, const char __user *userbuf, size_t count, loff_t *ppos) { - struct device *dev = file->private_data; + struct omap_iommu *obj = file->private_data; struct iovm_struct *area; char *p, *buf; @@ -310,8 +305,8 @@ static ssize_t debug_write_mem(struct file *file, const char __user *userbuf, goto err_out; } - area = omap_find_iovm_area(dev, (u32)ppos); - if (!area) { + area = omap_find_iovm_area(obj, (u32)ppos); + if (IS_ERR(area)) { count = -EINVAL; goto err_out; } @@ -355,7 +350,7 @@ DEBUG_FOPS(mem); { \ struct dentry *dent; \ dent = debugfs_create_file(#attr, mode, parent, \ - dev, &debug_##attr##_fops); \ + obj, &debug_##attr##_fops); \ if (!dent) \ return -ENOMEM; \ } @@ -367,29 +362,20 @@ static int iommu_debug_register(struct device *dev, void *data) { struct platform_device *pdev = to_platform_device(dev); struct omap_iommu *obj = platform_get_drvdata(pdev); - struct omap_iommu_arch_data *arch_data; struct dentry *d, *parent; if (!obj || !obj->dev) return -EINVAL; - arch_data = kzalloc(sizeof(*arch_data), GFP_KERNEL); - if (!arch_data) - return -ENOMEM; - - arch_data->iommu_dev = obj; - - dev->archdata.iommu = arch_data; - d = debugfs_create_dir(obj->name, iommu_debug_root); if (!d) - goto nomem; + return -ENOMEM; parent = d; d = debugfs_create_u8("nr_tlb_entries", 400, parent, (u8 *)&obj->nr_tlb_entries); if (!d) - goto nomem; + return -ENOMEM; DEBUG_ADD_FILE_RO(ver); DEBUG_ADD_FILE_RO(regs); @@ -398,22 +384,6 @@ static int iommu_debug_register(struct device *dev, void *data) DEBUG_ADD_FILE_RO(mmap); DEBUG_ADD_FILE(mem); - return 0; - -nomem: - kfree(arch_data); - return -ENOMEM; -} - -static int iommu_debug_unregister(struct device *dev, void *data) -{ - if (!dev->archdata.iommu) - return 0; - - kfree(dev->archdata.iommu); - - dev->archdata.iommu = NULL; - return 0; } @@ -441,7 +411,6 @@ module_init(iommu_debug_init) static void __exit iommu_debugfs_exit(void) { debugfs_remove_recursive(iommu_debug_root); - omap_foreach_iommu_device(NULL, iommu_debug_unregister); } module_exit(iommu_debugfs_exit) diff --git a/trunk/drivers/iommu/omap-iommu.c b/trunk/drivers/iommu/omap-iommu.c index 6899dcd02dfa..d8edd979d01b 100644 --- a/trunk/drivers/iommu/omap-iommu.c +++ b/trunk/drivers/iommu/omap-iommu.c @@ -1223,8 +1223,7 @@ static int __init omap_iommu_init(void) return platform_driver_register(&omap_iommu_driver); } -/* must be ready before omap3isp is probed */ -subsys_initcall(omap_iommu_init); +module_init(omap_iommu_init); static void __exit omap_iommu_exit(void) { diff --git a/trunk/fs/ecryptfs/miscdev.c b/trunk/fs/ecryptfs/miscdev.c index 3a06f4043df4..349209dc6a91 100644 --- a/trunk/fs/ecryptfs/miscdev.c +++ b/trunk/fs/ecryptfs/miscdev.c @@ -429,7 +429,7 @@ ecryptfs_miscdev_write(struct file *file, const char __user *buf, goto memdup; } else if (count < MIN_MSG_PKT_SIZE || count > MAX_MSG_PKT_SIZE) { printk(KERN_WARNING "%s: Acceptable packet size range is " - "[%d-%zu], but amount of data written is [%zu].", + "[%d-%lu], but amount of data written is [%zu].", __func__, MIN_MSG_PKT_SIZE, MAX_MSG_PKT_SIZE, count); return -EINVAL; } diff --git a/trunk/fs/gfs2/glock.c b/trunk/fs/gfs2/glock.c index 351a3e797789..376816fcd040 100644 --- a/trunk/fs/gfs2/glock.c +++ b/trunk/fs/gfs2/glock.c @@ -167,19 +167,14 @@ void gfs2_glock_add_to_lru(struct gfs2_glock *gl) spin_unlock(&lru_lock); } -static void __gfs2_glock_remove_from_lru(struct gfs2_glock *gl) +static void gfs2_glock_remove_from_lru(struct gfs2_glock *gl) { + spin_lock(&lru_lock); if (!list_empty(&gl->gl_lru)) { list_del_init(&gl->gl_lru); atomic_dec(&lru_count); clear_bit(GLF_LRU, &gl->gl_flags); } -} - -static void gfs2_glock_remove_from_lru(struct gfs2_glock *gl) -{ - spin_lock(&lru_lock); - __gfs2_glock_remove_from_lru(gl); spin_unlock(&lru_lock); } @@ -222,12 +217,11 @@ void gfs2_glock_put(struct gfs2_glock *gl) struct gfs2_sbd *sdp = gl->gl_sbd; struct address_space *mapping = gfs2_glock2aspace(gl); - if (atomic_dec_and_lock(&gl->gl_ref, &lru_lock)) { - __gfs2_glock_remove_from_lru(gl); - spin_unlock(&lru_lock); + if (atomic_dec_and_test(&gl->gl_ref)) { spin_lock_bucket(gl->gl_hash); hlist_bl_del_rcu(&gl->gl_list); spin_unlock_bucket(gl->gl_hash); + gfs2_glock_remove_from_lru(gl); GLOCK_BUG_ON(gl, !list_empty(&gl->gl_holders)); GLOCK_BUG_ON(gl, mapping && mapping->nrpages); trace_gfs2_glock_put(gl); diff --git a/trunk/fs/gfs2/inode.c b/trunk/fs/gfs2/inode.c index 56987460cdae..a7d611b93f0f 100644 --- a/trunk/fs/gfs2/inode.c +++ b/trunk/fs/gfs2/inode.c @@ -391,6 +391,10 @@ static int alloc_dinode(struct gfs2_inode *dip, u64 *no_addr, u64 *generation) int error; int dblocks = 1; + error = gfs2_rindex_update(sdp); + if (error) + fs_warn(sdp, "rindex update returns %d\n", error); + error = gfs2_inplace_reserve(dip, RES_DINODE); if (error) goto out; @@ -1039,7 +1043,6 @@ static int gfs2_unlink(struct inode *dir, struct dentry *dentry) rgd = gfs2_blk2rgrpd(sdp, ip->i_no_addr); if (!rgd) goto out_inodes; - gfs2_holder_init(rgd->rd_gl, LM_ST_EXCLUSIVE, 0, ghs + 2); diff --git a/trunk/fs/gfs2/ops_fstype.c b/trunk/fs/gfs2/ops_fstype.c index 24f609c9ef91..6aacf3f230a2 100644 --- a/trunk/fs/gfs2/ops_fstype.c +++ b/trunk/fs/gfs2/ops_fstype.c @@ -800,11 +800,6 @@ static int init_inodes(struct gfs2_sbd *sdp, int undo) fs_err(sdp, "can't get quota file inode: %d\n", error); goto fail_rindex; } - - error = gfs2_rindex_update(sdp); - if (error) - goto fail_qinode; - return 0; fail_qinode: diff --git a/trunk/fs/gfs2/rgrp.c b/trunk/fs/gfs2/rgrp.c index 49ada95209d0..981bfa32121a 100644 --- a/trunk/fs/gfs2/rgrp.c +++ b/trunk/fs/gfs2/rgrp.c @@ -683,21 +683,16 @@ int gfs2_rindex_update(struct gfs2_sbd *sdp) struct gfs2_glock *gl = ip->i_gl; struct gfs2_holder ri_gh; int error = 0; - int unlock_required = 0; /* Read new copy from disk if we don't have the latest */ if (!sdp->sd_rindex_uptodate) { mutex_lock(&sdp->sd_rindex_mutex); - if (!gfs2_glock_is_locked_by_me(gl)) { - error = gfs2_glock_nq_init(gl, LM_ST_SHARED, 0, &ri_gh); - if (error) - return error; - unlock_required = 1; - } + error = gfs2_glock_nq_init(gl, LM_ST_SHARED, 0, &ri_gh); + if (error) + return error; if (!sdp->sd_rindex_uptodate) error = gfs2_ri_update(ip); - if (unlock_required) - gfs2_glock_dq_uninit(&ri_gh); + gfs2_glock_dq_uninit(&ri_gh); mutex_unlock(&sdp->sd_rindex_mutex); } diff --git a/trunk/kernel/events/hw_breakpoint.c b/trunk/kernel/events/hw_breakpoint.c index b7971d6f38bf..ee706ce44aa0 100644 --- a/trunk/kernel/events/hw_breakpoint.c +++ b/trunk/kernel/events/hw_breakpoint.c @@ -651,10 +651,10 @@ int __init init_hw_breakpoint(void) err_alloc: for_each_possible_cpu(err_cpu) { - if (err_cpu == cpu) - break; for (i = 0; i < TYPE_MAX; i++) kfree(per_cpu(nr_task_bp_pinned[i], cpu)); + if (err_cpu == cpu) + break; } return -ENOMEM; diff --git a/trunk/mm/memblock.c b/trunk/mm/memblock.c index 99f285599501..77b5f227e1d8 100644 --- a/trunk/mm/memblock.c +++ b/trunk/mm/memblock.c @@ -99,6 +99,9 @@ phys_addr_t __init_memblock memblock_find_in_range_node(phys_addr_t start, phys_addr_t this_start, this_end, cand; u64 i; + /* align @size to avoid excessive fragmentation on reserved array */ + size = round_up(size, align); + /* pump up @end */ if (end == MEMBLOCK_ALLOC_ACCESSIBLE) end = memblock.current_limit; @@ -728,9 +731,6 @@ static phys_addr_t __init memblock_alloc_base_nid(phys_addr_t size, { phys_addr_t found; - /* align @size to avoid excessive fragmentation on reserved array */ - size = round_up(size, align); - found = memblock_find_in_range_node(0, max_addr, size, align, nid); if (found && !memblock_reserve(found, size)) return found; diff --git a/trunk/tools/testing/ktest/ktest.pl b/trunk/tools/testing/ktest/ktest.pl index 9507c4b251a8..62a134dc421a 100755 --- a/trunk/tools/testing/ktest/ktest.pl +++ b/trunk/tools/testing/ktest/ktest.pl @@ -3244,11 +3244,9 @@ sub make_min_config { $in_bisect = 1; my $failed = 0; - build "oldconfig" or $failed = 1; - if (!$failed) { - start_monitor_and_boot or $failed = 1; - end_monitor; - } + build "oldconfig"; + start_monitor_and_boot or $failed = 1; + end_monitor; $in_bisect = 0;