Commits on Apr 3, 2009
  1. @torvalds

    Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/viro/vfs-2.6
    
    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
      Remove two unneeded exports and make two symbols static in fs/mpage.c
      Cleanup after commit 585d3bc
      Trim includes of fdtable.h
      Don't crap into descriptor table in binfmt_som
      Trim includes in binfmt_elf
      Don't mess with descriptor table in load_elf_binary()
      Get rid of indirect include of fs_struct.h
      New helper - current_umask()
      check_unsafe_exec() doesn't care about signal handlers sharing
      New locking/refcounting for fs_struct
      Take fs_struct handling to new file (fs/fs_struct.c)
      Get rid of bumping fs_struct refcount in pivot_root(2)
      Kill unsharing fs_struct in __set_personality()
    torvalds committed Apr 2, 2009
  2. @torvalds

    Merge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/airlied/drm-2.6
    
    * 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (21 commits)
      drm/radeon: load the right microcode on rs780
      drm: remove unused "can_grow" parameter from drm_crtc_helper_initial_config
      drm: fix EDID backward compat check
      drm: sync the mode validation for INTERLACE/DBLSCAN
      drm: fix typo in edid vendor parsing.
      DRM: drm_crtc_helper.h doesn't actually need i2c.h
      drm: fix missing inline function on 32-bit powerpc.
      drm: Use pgprot_writecombine in GEM GTT mapping to get the right bits for !PAT.
      drm/i915: Add a spinlock to protect the active_list
      drm/i915: Fix SDVO TV support
      drm/i915: Fix SDVO CREATE_PREFERRED_INPUT_TIMING command
      drm/i915: Fix error in SDVO DTD and modeline convert
      drm/i915: Fix SDVO command debug function
      drm/i915: fix TV mode setting in property change
      drm/i915: only set TV mode when any property changed
      drm/i915: clean up udelay usage
      drm/i915: add VGA hotplug support for 945+
      drm/i915: correctly set IGD device's gtt size for KMS.
      drm/i915: avoid hanging on to a stale pointer to raw_edid.
      drm/i915: check for -EINVAL from vm_insert_pfn
      ...
    torvalds committed Apr 2, 2009
  3. @torvalds

    Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (54 commits)
      glge: remove unused #include <version.h>
      dnet: remove unused #include <version.h>
      tcp: miscounts due to tcp_fragment pcount reset
      tcp: add helper for counter tweaking due mid-wq change
      hso: fix for the 'invalid frame length' messages
      hso: fix for crash when unplugging the device
      fsl_pq_mdio: Fix compile failure
      fsl_pq_mdio: Revive UCC MDIO support
      ucc_geth: Pass proper device to DMA routines, otherwise oops happens
      i.MX31: Fixing cs89x0 network building to i.MX31ADS
      tc35815: Fix build error if NAPI enabled
      hso: add Vendor/Product ID's for new devices
      ucc_geth: Remove unused header
      gianfar: Remove unused header
      kaweth: Fix locking to be SMP-safe
      net: allow multiple dev per napi with GRO
      r8169: reset IntrStatus after chip reset
      ixgbe: Fix potential memory leak/driver panic issue while setting up Tx & Rx ring parameters
      ixgbe: fix ethtool -A|a behavior
      ixgbe: Patch to fix driver panic while freeing up tx & rx resources
      ...
    torvalds committed Apr 2, 2009
  4. @torvalds

    cpumask: fix slab corruption caused by alloc_cpumask_var_node()

    Fix slab corruption caused by alloc_cpumask_var_node() overwriting the
    tail end of an off-stack cpumask.
    
    The function zeros out cpumask bits beyond the last possible cpu.  The
    starting point for zeroing should be the beginning of the mask offset by a
    byte count derived from the number of possible cpus.  The offset was
    calculated in bits instead of bytes.  This resulted in overwriting the end
    of the cpumask.
    
    Signed-off-by: Jack Steiner <steiner@sgi.com>
    Acked-by: Mike Travis <travis.sgi.com>
    Acked-by: Ingo Molnar <mingo@elte.hu>
    Cc: Rusty Russell <rusty@rustcorp.com.au>
    Cc: Stephen Rothwell <sfr@canb.auug.org.au>
    Cc: <stable@kernel.org>		[2.6.29.x]
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Jack Steiner committed with torvalds Apr 2, 2009
  5. @torvalds

    ia64: implement interrupt-enabling rwlocks

    Implement __raw_read_lock_flags and __raw_write_lock_flags for the ia64
    architecture.
    
    [kosaki.motohiro@jp.fujitsu.com: typo fix]
    Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
    Signed-off-by: Robin Holt <holt@sgi.com>
    Cc: <linux-arch@vger.kernel.org>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Acked-by: Tony Luck <tony.luck@intel.com>
    Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Robin Holt committed with torvalds Apr 2, 2009
  6. @torvalds

    Allow rwlocks to re-enable interrupts

    Pass the original flags to rwlock arch-code, so that it can re-enable
    interrupts if implemented for that architecture.
    
    Initially, make __raw_read_lock_flags and __raw_write_lock_flags stubs
    which just do the same thing as non-flags variants.
    
    Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
    Signed-off-by: Robin Holt <holt@sgi.com>
    Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: <linux-arch@vger.kernel.org>
    Acked-by: Ingo Molnar <mingo@elte.hu>
    Cc: "Luck, Tony" <tony.luck@intel.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Robin Holt committed with torvalds Apr 2, 2009
  7. @torvalds

    Factor out #ifdefs from kernel/spinlock.c to LOCK_CONTENDED_FLAGS

    SGI has observed that on large systems, interrupts are not serviced for a
    long period of time when waiting for a rwlock.  The following patch series
    re-enables irqs while waiting for the lock, resembling the code which is
    already there for spinlocks.
    
    I only made the ia64 version, because the patch adds some overhead to the
    fast path.  I assume there is currently no demand to have this for other
    architectures, because the systems are not so large.  Of course, the
    possibility to implement raw_{read|write}_lock_flags for any architecture
    is still there.
    
    This patch:
    
    The new macro LOCK_CONTENDED_FLAGS expands to the correct implementation
    depending on the config options, so that IRQ's are re-enabled when
    possible, but they remain disabled if CONFIG_LOCKDEP is set.
    
    Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
    Signed-off-by: Robin Holt <holt@sgi.com>
    Cc: <linux-arch@vger.kernel.org>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: "Luck, Tony" <tony.luck@intel.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Robin Holt committed with torvalds Apr 2, 2009
  8. @torvalds

    fs/ufs: return f_fsid for statfs(2)

    Make ufs return f_fsid info for statfs(2).
    
    Signed-off-by: Coly Li <coly.li@suse.de>
    Cc: Evgeniy Dushistov <dushistov@mail.ru>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Coly Li committed with torvalds Apr 2, 2009
  9. @torvalds

    fs/sysv: return f_fsid for statfs(2)

    Make sysv file system return f_fsid info for statfs(2).
    
    Signed-off-by: Coly Li <coly.li@suse.de>
    Cc: Christoph Hellwig <hch@infradead.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Coly Li committed with torvalds Apr 2, 2009
  10. @torvalds

    fs/squashfs: return f_fsid for statfs(2)

    Make squashfs return f_fsid info for statfs(2).
    
    Signed-off-by: Coly Li <coly.li@suse.de>
    Cc: Phillip Lougher <phillip@lougher.demon.co.uk>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Coly Li committed with torvalds Apr 2, 2009
  11. @torvalds

    fs/reiserfs: return f_fsid for statfs(2)

    Make reiserfs3 return f_fsid info for statfs(2).  By Andreas' suggestion,
    this patch populates a persistent f_fsid between boots/mounts with help of
    on-disk uuid record.
    
    Randy Dunlap reported a compiling error from v2 patch like:
        fs/built-in.o: In function `reiserfs_statfs':
        super.c:(.text+0x7332b): undefined reference to `crc32_le'
        super.c:(.text+0x7333f): undefined reference to `crc32_le'
    Also he provided helpful solution to fix this error. The modification of v3
    patch is based on Randy's suggestion, add 'select CRC32' in fs/reiserfs/Kconfig.
    
    Signed-off-by: Coly Li <coly.li@suse.de>
    Cc: Randy Dunlap <randy.dunlap@oracle.com>
    Cc: Jeff Mahoney <jeffm@suse.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Coly Li committed with torvalds Apr 2, 2009
  12. @torvalds

    fs/qnx4: return f_fsid for statfs(2)

    Make qnx4 file system return f_fsid info for statfs(2).
    
    Signed-off-by: Coly Li <coly.li@suse.de>
    Acked-by: Anders Larsen <al@alarsen.net>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Coly Li committed with torvalds Apr 2, 2009
  13. @torvalds

    fs/omfs: return f_fsid for statfs(2)

    Make omfs return f_fsid info for statfs(2).
    
    Signed-off-by: Coly Li <coly.li@suse.de>
    Acked-by: Bob Copeland <me@bobcopeland.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Coly Li committed with torvalds Apr 2, 2009
  14. @torvalds

    fs/minix: return f_fsid for statfs(2)

    Make minix file system return f_fsid info for statfs(2).
    
    Signed-off-by: Coly Li <coly.li@suse.de>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Coly Li committed with torvalds Apr 2, 2009
  15. @torvalds

    fs/isofs: return f_fsid for statfs(2)

    Make isofs return f_fsid info for statfs(2).
    
    Signed-off-by: Coly Li <coly.li@suse.de>
    Cc: Jan Kara <jack@ucw.cz>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Coly Li committed with torvalds Apr 2, 2009
  16. @torvalds

    fs/hpfs: return f_fsid for statfs(2)

    Make hpfs return f_fsid info for statfs(2).
    
    Signed-off-by: Coly Li <coly.li@suse.de>
    Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Coly Li committed with torvalds Apr 2, 2009
  17. @torvalds

    fs/hfsplus: return f_fsid for statfs(2)

    Make hfsplus return f_fsid info for statfs(2).
    
    Signed-off-by: Coly Li <coly.li@suse.de>
    Cc: Roman Zippel <zippel@linux-m68k.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Coly Li committed with torvalds Apr 2, 2009
  18. @torvalds

    fs/hfs: return f_fsid for statfs(2)

    Make hfs return f_fsid info for statfs(2).
    
    Signed-off-by: Coly Li <coly.li@suse.de>
    Cc: Roman Zippel <zippel@linux-m68k.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Coly Li committed with torvalds Apr 2, 2009
  19. @torvalds

    fs/fat: return f_fsid for statfs(2)

    Make fat return f_fsid info for statfs(2).
    
    Signed-off-by: Coly Li <coly.li@suse.de>
    Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Coly Li committed with torvalds Apr 2, 2009
  20. @torvalds

    fs/efs: return f_fsid for statfs(2)

    Make efs return f_fsid info for statfs(2), and do a little variable
    renaming in efs_statfs().
    
    Signed-off-by: Coly Li <coly.li@suse.de>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Coly Li committed with torvalds Apr 2, 2009
  21. @torvalds

    fs/cramfs: return f_fsid for statfs(2)

    Make cramfs return f_fsid info for statfs(2).
    
    Signed-off-by: Coly Li <coly.li@suse.de>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Coly Li committed with torvalds Apr 2, 2009
  22. @torvalds

    fs/befs: return f_fsid for statfs(2)

    Make befs return f_fsid info for statfs(2).
    
    Signed-off-by: Coly Li <coly.li@suse.de>
    Cc: Sergey S. Kostyliov <rathamahata@php4.ru>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Coly Li committed with torvalds Apr 2, 2009
  23. @torvalds

    fs/affs: return f_fsid for statfs(2)

    Make affs return f_fsid info for statfs(2).
    
    Signed-off-by: Coly Li <coly.li@suse.de>
    Cc: Roman Zippel <zippel@linux-m68k.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Coly Li committed with torvalds Apr 2, 2009
  24. @torvalds

    fs/adfs: return f_fsid for statfs(2)

    Currently many file systems in Linux kernel do not return f_fsid in statfs
    info, the value is set as 0 in vfs layer.  Anyway, in some conditions,
    f_fsid from statfs(2) is useful, especially being used as (f_fsid, ino)
    pair to uniquely identify a file.
    
    Basic idea of the patches is generating a unique fs ID by
    huge_encode_dev(sb->s_bdev->bd_dev) during file system mounting life time
    (no endian consistent issue).  sb is a point of struct super_block of
    current mounted file system being accessed by statfs(2).
    
    This patch:
    
    Make adfs return f_fsid info for statfs(2), and do a little variable
    renaming in adfs_statfs().
    
    Signed-off-by: Coly Li <coly.li@suse.de>
    Cc: Roman Zippel <zippel@linux-m68k.org>
    Cc: "Sergey S. Kostyliov" <rathamahata@php4.ru>
    Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
    Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
    Cc: Dave Kleikamp <shaggy@austin.ibm.com>
    Cc: Bob Copeland <me@bobcopeland.com>
    Cc: Anders Larsen <al@alarsen.net>
    Cc: Phillip Lougher <phillip@lougher.demon.co.uk>
    Cc: Christoph Hellwig <hch@infradead.org>
    Cc: Evgeniy Dushistov <dushistov@mail.ru>
    Cc: Jan Kara <jack@suse.cz>
    Cc: Andreas Dilger <adilger@sun.com>
    Cc: Jamie Lokier <jamie@shareable.org>
    Cc: Theodore Ts'o <tytso@mit.edu>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Coly Li committed with torvalds Apr 2, 2009
  25. @kraxel @torvalds

    preadv/pwritev: switch compat readv/preadv/writev/pwritev from fget t…

    …o fget_light
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: <linux-api@vger.kernel.org>
    Cc: <linux-arch@vger.kernel.org>
    Cc: Ralf Baechle <ralf@linux-mips.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    kraxel committed with torvalds Apr 2, 2009
  26. @ralfbaechle @torvalds

    preadv/pwritev: MIPS: Add preadv(2) and pwritev(2) syscalls.

    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: <linux-api@vger.kernel.org>
    Cc: <linux-arch@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    ralfbaechle committed with torvalds Apr 2, 2009
  27. @kraxel @torvalds

    preadv/pwritev: Add preadv and pwritev system calls.

    This patch adds preadv and pwritev system calls.  These syscalls are a
    pretty straightforward combination of pread and readv (same for write).
    They are quite useful for doing vectored I/O in threaded applications.
    Using lseek+readv instead opens race windows you'll have to plug with
    locking.
    
    Other systems have such system calls too, for example NetBSD, check
    here: http://www.daemon-systems.org/man/preadv.2.html
    
    The application-visible interface provided by glibc should look like
    this to be compatible to the existing implementations in the *BSD family:
    
      ssize_t preadv(int d, const struct iovec *iov, int iovcnt, off_t offset);
      ssize_t pwritev(int d, const struct iovec *iov, int iovcnt, off_t offset);
    
    This prototype has one problem though: On 32bit archs is the (64bit)
    offset argument unaligned, which the syscall ABI of several archs doesn't
    allow to do.  At least s390 needs a wrapper in glibc to handle this.  As
    we'll need a wrappers in glibc anyway I've decided to push problem to
    glibc entriely and use a syscall prototype which works without
    arch-specific wrappers inside the kernel: The offset argument is
    explicitly splitted into two 32bit values.
    
    The patch sports the actual system call implementation and the windup in
    the x86 system call tables.  Other archs follow as separate patches.
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: <linux-api@vger.kernel.org>
    Cc: <linux-arch@vger.kernel.org>
    Cc: Ralf Baechle <ralf@linux-mips.org>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: "H. Peter Anvin" <hpa@zytor.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    kraxel committed with torvalds Apr 2, 2009
  28. @kraxel @torvalds

    preadv/pwritev: create compat_writev()

    Factor out some code from compat_sys_writev() which can be shared with the
    upcoming compat_sys_pwritev().
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: <linux-api@vger.kernel.org>
    Cc: <linux-arch@vger.kernel.org>
    Cc: Ralf Baechle <ralf@linux-mips.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    kraxel committed with torvalds Apr 2, 2009
  29. @kraxel @torvalds

    preadv/pwritev: create compat_readv()

    This patch series:
    
    Implement the preadv() and pwritev() syscalls.  *BSD has this syscall for
    quite some time.
    
    Test code:
    
    #if 0
    set -x
    gcc -Wall -O2 -o preadv $0
    exit 0
    #endif
    /*
     * preadv demo / test
     *
     * (c) 2008 Gerd Hoffmann <kraxel@redhat.com>
     *
     * build with "sh $thisfile"
     */
    
    #include <stdio.h>
    #include <stdlib.h>
    #include <unistd.h>
    #include <errno.h>
    #include <inttypes.h>
    #include <sys/uio.h>
    
    /* ----------------------------------------------------------------- */
    /* syscall windup                                                    */
    
    #include <sys/syscall.h>
    #if 0
    /* WARNING: Be sure you know what you are doing if you enable this.
     * linux syscall code isn't upstream yet, syscall numbers are subject
     * to change */
    # ifndef __NR_preadv
    #  ifdef __i386__
    #   define __NR_preadv  333
    #   define __NR_pwritev 334
    #  endif
    #  ifdef __x86_64__
    #   define __NR_preadv  295
    #   define __NR_pwritev 296
    #  endif
    # endif
    #endif
    #ifndef __NR_preadv
    # error preadv/pwritev syscall numbers are unknown
    #endif
    
    static ssize_t preadv(int fd, const struct iovec *iov, int iovcnt, off_t offset)
    {
        uint32_t pos_high = (offset >> 32) & 0xffffffff;
        uint32_t pos_low  =  offset        & 0xffffffff;
    
        return syscall(__NR_preadv, fd, iov, iovcnt, pos_high, pos_low);
    }
    
    static ssize_t pwritev(int fd, const struct iovec *iov, int iovcnt, off_t offset)
    {
        uint32_t pos_high = (offset >> 32) & 0xffffffff;
        uint32_t pos_low  =  offset        & 0xffffffff;
    
        return syscall(__NR_pwritev, fd, iov, iovcnt, pos_high, pos_low);
    }
    
    /* ----------------------------------------------------------------- */
    /* demo/test app                                                     */
    
    static char filename[] = "/tmp/preadv-XXXXXX";
    static char outbuf[11] = "0123456789";
    static char inbuf[11]  = "----------";
    
    static struct iovec ovec[2] = {{
            .iov_base = outbuf + 5,
            .iov_len  = 5,
        },{
            .iov_base = outbuf + 0,
            .iov_len  = 5,
        }};
    
    static struct iovec ivec[3] = {{
            .iov_base = inbuf + 6,
            .iov_len  = 2,
        },{
            .iov_base = inbuf + 4,
            .iov_len  = 2,
        },{
            .iov_base = inbuf + 2,
            .iov_len  = 2,
        }};
    
    void cleanup(void)
    {
        unlink(filename);
    }
    
    int main(int argc, char **argv)
    {
        int fd, rc;
    
        fd = mkstemp(filename);
        if (-1 == fd) {
            perror("mkstemp");
            exit(1);
        }
        atexit(cleanup);
    
        /* write to file: "56789-01234" */
        rc = pwritev(fd, ovec, 2, 0);
        if (rc < 0) {
            perror("pwritev");
            exit(1);
        }
    
        /* read from file: "78-90-12" */
        rc = preadv(fd, ivec, 3, 2);
        if (rc < 0) {
            perror("preadv");
            exit(1);
        }
    
        printf("result  : %s\n", inbuf);
        printf("expected: %s\n", "--129078--");
        exit(0);
    }
    
    This patch:
    
    Factor out some code from compat_sys_readv() which can be shared with the
    upcoming compat_sys_preadv().
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: <linux-api@vger.kernel.org>
    Cc: <linux-arch@vger.kernel.org>
    Cc: Ralf Baechle <ralf@linux-mips.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    kraxel committed with torvalds Apr 2, 2009
  30. @torvalds

    cramfs: propagate uncompression errors

    Decompression errors can arise due to corruption of compressed blocks on
    flash or in memory.  This patch propagates errors detected during
    decompression back to the block layer.
    
    Signed-off-by: David VomLehn <dvomlehn@cisco.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    David VomLehn committed with torvalds Apr 2, 2009
  31. @torvalds

    xpc_sn2: fix max() warning about pointers of different types

    Fix a minor compile warning when building on ia64.
    
    drivers/misc/sgi-xp/xpc_sn2.c: In function `xpc_clear_remote_msgqueue_flags_sn2':
    drivers/misc/sgi-xp/xpc_sn2.c:1746: warning: comparison of distinct pointer types lacks a cast
    
    Signed-off-by: Robin Holt <holt@sgi.com>
    Cc: Sam Ravnborg <sam@ravnborg.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Robin Holt committed with torvalds Apr 2, 2009
  32. @torvalds

    sgi-gru: remove SGI_GRU as a valid config option for ia64 configs wit…

    …h SGI_UV
    
    Some current configs turn on GRU for ia64.  The GRU code does not
    correctly load on boot on ia64 (GRU does continue to work for x86-64), so
    changing the IA64 Kconfig to not select GRU on ia64 configs for now until
    we have time to fix.
    
    Signed-off-by: Robin Holt <holt@sgi.com>
    Acked-by: Jack Steiner <steiner@sgi.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Robin Holt committed with torvalds Apr 2, 2009
  33. @torvalds

    sgi-gru: support multiple pagesizes in GRU

    Add multiple pagesize support to the GRU driver.
    
    Signed-off-by: Jack Steiner <steiner@sgi.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Jack Steiner committed with torvalds Apr 2, 2009
  34. @torvalds

    sgi-gru: fix bugs related to module unload of the GRU driver

    Fix bugs related to module unload of the GRU driver.
    
    Signed-off-by: Jack Steiner <steiner@sgi.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Jack Steiner committed with torvalds Apr 2, 2009
  35. @torvalds

    sgi-gru: macro for scanning all gru chiplets

    Add macro for scanning all active GRU chiplets.  Maximum chiplet id is
    saved during GRU initialization.
    
    Signed-off-by: Jack Steiner <steiner@sgi.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Jack Steiner committed with torvalds Apr 2, 2009