12 Jun, 2009

40 commits

  • It's theoretically possible that there are exception table entries
    which point into the (freed) init text of modules. These could cause
    future problems if other modules get loaded into that memory and cause
    an exception as we'd see the wrong fixup. The only case I know of is
    kvm-intel.ko (when CONFIG_CC_OPTIMIZE_FOR_SIZE=n).

    Amerigo fixed this long-standing FIXME in the x86 version, but this
    patch is more general.

    This implements trim_init_extable(); most archs are simple since they
    use the standard lib/extable.c sort code. Alpha and IA64 use relative
    addresses in their fixups, so thier trimming is a slight variation.

    Sparc32 is unique; it doesn't seem to define ARCH_HAS_SORT_EXTABLE,
    yet it defines its own sort_extable() which overrides the one in lib.
    It doesn't sort, so we have to mark deleted entries instead of
    actually trimming them.

    Inspired-by: Amerigo Wang
    Signed-off-by: Rusty Russell
    Cc: linux-alpha@vger.kernel.org
    Cc: sparclinux@vger.kernel.org
    Cc: linux-ia64@vger.kernel.org

    Rusty Russell
     
  • As Christoph Hellwig suggested, module_alloc() actually can be
    unified for i386 and x86_64 (of course, also UML).

    Signed-off-by: WANG Cong
    Cc: Christoph Hellwig
    Cc: 'Ingo Molnar'
    Signed-off-by: Rusty Russell

    Amerigo Wang
     
  • Due to the previous merge, uml needs to be fixed.

    Signed-off-by: WANG Cong
    Cc: Jeff Dike
    Signed-off-by: Rusty Russell

    Amerigo Wang
     
  • Merge the rest functions together, with proper preprocessing directives.
    Finally remove module_{32|64}.c.

    Signed-off-by: WANG Cong
    Cc: Ingo Molnar
    Signed-off-by: Rusty Russell

    Amerigo Wang
     
  • Merge the same functions both in module_32.c and module_64.c into
    module.c.

    This is the first step to merge both of them finally.

    Signed-off-by: WANG Cong
    Cc: Ingo Molnar
    Signed-off-by: Rusty Russell

    Amerigo Wang
     
  • 1) Now module_param(..., invbool, ...) requires a bool, and similarly
    module_param(..., bool, ...) allows it, change pmi_setpal to a bool.
    2) #define param_get_scroll to NULL, since it can never be called (perm
    argument to module_param_named is 0).
    3) Return -EINVAL from param_set_scroll if the value is bad, so it's
    reported.

    Note that I don't think the old fb_get_options() is required for new
    drivers: the parameters automatically work as uvesafb.XXX=... anyway.

    Acked-by: Michał Januszewski
    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • Impact: API cleanup

    For historical reasons, 'bool' parameters must be an int, not a bool.
    But there are around 600 users, so a conversion seems like useless churn.

    So we use __same_type() to distinguish, and handle both cases.

    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • Impact: new API

    __builtin_types_compatible_p() is a little awkward to use: it takes two
    types rather than types or variables, and it's just damn long.

    (typeof(type) == type, so this works on types as well as vars).

    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • Impact: cleanup

    Rather than hack KPARAM_KMALLOCED into the perm field, separate it out.
    Since the perm field was 32 bits and only needs 16, we don't add bloat.

    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • It takes an 'int' for historical reasons, and there are only two
    users: simply switch it over to bool.

    The other user (uvesafb.c) will get a (harmless-on-x86) warning until
    the next patch is applied.

    Cc: Brad Douglas
    Cc: Michal Januszewski
    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • Russell explains the __module_get():
    > cyber2000fb.c does it in its module initialization function
    > to prevent the module (when built for Shark) from being unloaded. It
    > does this because it's from the days of 2.2 kernels and no one bothered
    > writing the module unload support for Shark.

    Since 2.4, the correct answer has been to not define an unload fn.

    Cc: Russell King
    Cc: alex@shark-linux.de
    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • Fix kernel-doc warnings in recently changed block/ source code.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (87 commits)
    nilfs2: get rid of bd_mount_sem use from nilfs
    nilfs2: correct exclusion control in nilfs_remount function
    nilfs2: simplify remaining sget() use
    nilfs2: get rid of sget use for checking if current mount is present
    nilfs2: get rid of sget use for acquiring nilfs object
    nilfs2: remove meaningless EBUSY case from nilfs_get_sb function
    remove the call to ->write_super in __sync_filesystem
    nilfs2: call nilfs2_write_super from nilfs2_sync_fs
    jffs2: call jffs2_write_super from jffs2_sync_fs
    ufs: add ->sync_fs
    sysv: add ->sync_fs
    hfsplus: add ->sync_fs
    hfs: add ->sync_fs
    fat: add ->sync_fs
    ext2: add ->sync_fs
    exofs: add ->sync_fs
    bfs: add ->sync_fs
    affs: add ->sync_fs
    sanitize ->fsync() for affs
    repair bfs_write_inode(), switch bfs to simple_fsync()
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
    m68knommu: remove unecessary include of thread_info.h in entry.S
    m68knommu: enumerate INIT_THREAD fields properly
    headers_check fix: m68k, swab.h
    arch/m68knommu: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
    m68knommu: remove obsolete reset code
    m68knommu: move CPU reset code for the 5272 ColdFire into its platform code
    m68knommu: move CPU reset code for the 528x ColdFire into its platform code
    m68knommu: move CPU reset code for the 527x ColdFire into its platform code
    m68knommu: move CPU reset code for the 523x ColdFire into its platform code
    m68knommu: move CPU reset code for the 520x ColdFire into its platform code
    m68knommu: add CPU reset code for the 532x ColdFire
    m68knommu: add CPU reset code for the 5249 ColdFire
    m68knommu: add CPU reset code for the 5206e ColdFire
    m68knommu: add CPU reset code for the 5206 ColdFire
    m68knommu: add CPU reset code for the 5407 ColdFire
    m68knommu: add CPU reset code for the 5307 ColdFire
    m68knommu: merge system reset for code ColdFire 523x family
    m68knommu: fix system reset for ColdFire 527x family

    Linus Torvalds
     
  • zalloc_cpumask_var already cleared it.

    Signed-off-by: Yinghai Lu
    Signed-off-by: Linus Torvalds

    Yinghai Lu
     
  • So we make sure MAXSMP gets a cleared cpumask

    Signed-off-by: Yinghai Lu
    Signed-off-by: Linus Torvalds

    Yinghai Lu
     
  • Commit 925d519ab82b6dd7aca9420d809ee83819c08db2 ("perf_counter:
    unify and fix delayed counter wakeup") added global definitions.

    Signed-off-by: Stephen Rothwell
    Acked-by: Paul Mackerras
    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • This will remove every bd_mount_sem use in nilfs.

    The intended exclusion control was replaced by the previous patch
    ("nilfs2: correct exclusion control in nilfs_remount function") for
    nilfs_remount(), and this patch will replace remains with a new mutex
    that this inserts in nilfs object.

    Signed-off-by: Ryusuke Konishi
    Cc: Christoph Hellwig
    Signed-off-by: Al Viro

    Ryusuke Konishi
     
  • nilfs_remount() changes mount state of a superblock instance. Even
    though nilfs accesses other superblock instances during mount or
    remount, the mount state was not properly protected in
    nilfs_remount().

    Moreover, nilfs_remount() has a lock order reversal problem;
    nilfs_get_sb() holds:

    1. bdev->bd_mount_sem
    2. sb->s_umount (sget acquires)

    and nilfs_remount() holds:

    1. sb->s_umount (locked by the caller in vfs)
    2. bdev->bd_mount_sem

    To avoid these problems, this patch divides a semaphore protecting
    super block instances from nilfs->ns_sem, and applies it to the mount
    state protection in nilfs_remount().

    With this change, bd_mount_sem use is removed from nilfs_remount() and
    the lock order reversal will be resolved. And the new rw-semaphore,
    nilfs->ns_super_sem will properly protect the mount state except the
    modification from nilfs_error function.

    Signed-off-by: Ryusuke Konishi
    Signed-off-by: Al Viro

    Ryusuke Konishi
     
  • This simplifies the test function passed on the remaining sget()
    callsite in nilfs.

    Instead of checking mount type (i.e. ro-mount/rw-mount/snapshot mount)
    in the test function passed to sget(), this patch first looks up the
    nilfs_sb_info struct which the given mount type matches, and then
    acquires the super block instance holding the nilfs_sb_info.

    Signed-off-by: Ryusuke Konishi
    Cc: Al Viro
    Signed-off-by: Al Viro

    Ryusuke Konishi
     
  • This stops using sget() for checking if an r/w-mount or an r/o-mount
    exists on the device. This elimination uses a back pointer to the
    current mount added to nilfs object.

    Signed-off-by: Ryusuke Konishi
    Cc: Al Viro
    Signed-off-by: Al Viro

    Ryusuke Konishi
     
  • This will change the way to obtain nilfs object in nilfs_get_sb()
    function.

    Previously, a preliminary sget() call was performed, and the nilfs
    object was acquired from a super block instance found by the sget()
    call.

    This patch, instead, instroduces a new dedicated function
    find_or_create_nilfs(); as the name implies, the function finds an
    existent nilfs object from a global list or creates a new one if no
    object is found on the device.

    Signed-off-by: Ryusuke Konishi
    Cc: Al Viro
    Signed-off-by: Al Viro

    Ryusuke Konishi
     
  • The following EBUSY case in nilfs_get_sb() is meaningless. Indeed,
    this error code is never returned to the caller.

    if (!s->s_root) {
    ...
    } else if (!(s->s_flags & MS_RDONLY)) {
    err = -EBUSY;
    }

    This simply removes the else case.

    Signed-off-by: Ryusuke Konishi
    Signed-off-by: Al Viro

    Ryusuke Konishi
     
  • Now that all filesystems provide ->sync_fs methods we can change
    __sync_filesystem to only call ->sync_fs.

    This gives us a clear separation between periodic writeouts which
    are driven by ->write_super and data integrity syncs that go
    through ->sync_fs. (modulo file_fsync which is also going away)

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • The call to ->write_super from __sync_filesystem will go away, so make
    sure nilfs2 performs the same actions from inside ->sync_fs.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • The call to ->write_super from __sync_filesystem will go away, so make
    sure jffs2 performs the same actions from inside ->sync_fs.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • Add a ->sync_fs method for data integrity syncs, and reimplement
    ->write_super ontop of it.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • Add a ->sync_fs method for data integrity syncs, and reimplement
    ->write_super ontop of it.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • Add a ->sync_fs method for data integrity syncs, and reimplement
    ->write_super ontop of it.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • Add a ->sync_fs method for data integrity syncs.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • Add a ->sync_fs method for data integrity syncs.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • Add a ->sync_fs method for data integrity syncs, and reimplement
    ->write_super ontop of it.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • Add a ->sync_fs method for data integrity syncs, and reimplement
    ->write_super ontop of it.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • Add a ->sync_fs method for data integrity syncs, and reimplement
    ->write_super ontop of it.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • Add a ->sync_fs method for data integrity syncs. Factor out common code
    between affs_put_super, affs_write_super and the new affs_sync_fs into
    a helper.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • unfortunately, for affs (especially for affs directories) we have
    no real way to keep track of metadata ownership. So we have to
    do more or less what file_fsync() does, but we do *not* need to
    call write_super() there.

    Signed-off-by: Al Viro

    Al Viro
     
  • Signed-off-by: Al Viro

    Al Viro
     
  • Missing conversion to host-endian before doing shifts

    Signed-off-by: Al Viro

    Al Viro
     
  • Signed-off-by: Al Viro

    Al Viro
     
  • Signed-off-by: Al Viro

    Al Viro