16 Mar, 2010

1 commit


15 Mar, 2010

1 commit


13 Mar, 2010

9 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/hirofumi/fatfs-2.6:
    fat: Fix stat->f_namelen
    fat: Fix vfat_lookup()

    Linus Torvalds
     
  • Inotify was switched to use anon_inode instead of its own private filesystem
    which only had one inode in commit c44dcc56d2b5c7 "switch inotify_user to
    anon_inode"

    The problem with this is that now the inotify inode is not a distinct inode
    which can be managed by LSMs. userspace tools which use inotify were allowed
    to use the inotify inode but may not have had permission to do read/write type
    operations on the anon_inode. After looking at the anon_inode and its users
    it looks like the best solution is to just mark the anon_inode as S_PRIVATE
    so the security system will ignore it.

    Signed-off-by: Eric Paris
    Acked-by: James Morris
    Signed-off-by: Linus Torvalds

    Eric Paris
     
  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6:
    udf: use ext2_find_next_bit
    udf: Do not read inode before writing it
    udf: Fix unalloc space handling in udf_update_inode

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (56 commits)
    doc: fix typo in comment explaining rb_tree usage
    Remove fs/ntfs/ChangeLog
    doc: fix console doc typo
    doc: cpuset: Update the cpuset flag file
    Fix of spelling in arch/sparc/kernel/leon_kernel.c no longer needed
    Remove drivers/parport/ChangeLog
    Remove drivers/char/ChangeLog
    doc: typo - Table 1-2 should refer to "status", not "statm"
    tree-wide: fix typos "ass?o[sc]iac?te" -> "associate" in comments
    No need to patch AMD-provided drivers/gpu/drm/radeon/atombios.h
    devres/irq: Fix devm_irq_match comment
    Remove reference to kthread_create_on_cpu
    tree-wide: Assorted spelling fixes
    tree-wide: fix 'lenght' typo in comments and code
    drm/kms: fix spelling in error message
    doc: capitalization and other minor fixes in pnp doc
    devres: typo fix s/dev/devm/
    Remove redundant trailing semicolons from macros
    fix typo "definetly" -> "definitely" in comment
    tree-wide: s/widht/width/g typo in comments
    ...

    Fix trivial conflict in Documentation/laptops/00-INDEX

    Linus Torvalds
     
  • Alex Viskovatoff let me know that after copying data to solaris's ufs from
    linux, solaris's fsck sees some errors in cylinder summary information.
    This is because of solaris expects find some data on another places, then
    curernt implementation save it. This patch fixes this issue. It is
    tested by me, and also Alex reported that it works for him.

    Signed-off-by: Evgeniy Dushistov
    Reported-by: Alex Viskovatoff
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Dushistov
     
  • Recent releases of Solaris set the fs_clean state of an unmounted UFS file
    system as FSLOG ("logging fs"). However, the Linux kernel currently does
    not recognize the value which represents this state. Thus, attempting to
    mount such a file system rw produces the message

    kernel: ufs_read_super: can't grok fs_clean 0xfffffffd

    and the file system is mounted read-only. This patch makes the kernel
    recognize that value.

    Signed-off-by: Alex Viskovatoff
    Cc: Evgeniy Dushistov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alex Viskovatoff
     
  • Add a generic implementation of the old select() syscall, which expects
    its argument in a memory block and switch all architectures over to use
    it.

    Signed-off-by: Christoph Hellwig
    Cc: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mundt
    Cc: Jeff Dike
    Cc: Hirokazu Takata
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Reviewed-by: H. Peter Anvin
    Cc: Al Viro
    Cc: Arnd Bergmann
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: "Luck, Tony"
    Cc: James Morris
    Acked-by: Andreas Schwab
    Acked-by: Russell King
    Acked-by: Greg Ungerer
    Acked-by: David Howells
    Cc: Andreas Schwab
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • When using slub, having a kmem_cache constructor forces slub to add a free
    pointer to the size of the cached object, which can have a significant
    impact to the number of small objects that can fit into a slab.

    As buffer_head is relatively small and we can have large numbers of them,
    removing the constructor is a definite win.

    On x86_64 removing the constructor gives me 39 objects/slab, 3 more than
    without the patch. And on x86_32 73 objects/slab, which is 9 more.

    As alloc_buffer_head() already initializes each new object there is very
    little difference in actual code run.

    Signed-off-by: Richard Kennedy
    Cc: Alexander Viro
    Cc: Jens Axboe
    Acked-by: Nick Piggin
    Cc: "Theodore Ts'o"
    Reviewed-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Richard Kennedy
     
  • Signed-off-by: Joe Perches
    Cc: Mark Fasheh
    Acked-by: Joel Becker
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     

10 Mar, 2010

3 commits

  • Use ext2_find_next_bit (generic_find_next_le_bit) to find the set bit
    in little endian bitmap region.

    Signed-off-by: Akinobu Mita
    Signed-off-by: Jan Kara

    Akinobu Mita
     
  • We needlessly read inode in udf_update_inode just before zeroing out the
    contents of the buffer. Fix it.

    Signed-off-by: Jan Kara

    Jan Kara
     
  • Writing of inode holding unallocated space info was broken because we first
    cleared the buffer and after that checked whether it contains a tag meaning the
    block holds unallocated space information. Fix the problem by checking
    appropriate in memory flag instead.

    Also cleanup the function a bit along the way - most importantly lock buffer
    when modifying its contents, check for buffer_write_io_error instead of
    !buffer_uptodate, etc..

    Signed-off-by: Jan Kara

    Jan Kara
     

09 Mar, 2010

4 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
    Btrfs: kfree correct pointer during mount option parsing
    Btrfs: use RB_ROOT to intialize rb_trees instead of setting rb_node to NULL

    Linus Torvalds
     
  • We kstrdup the options string, but then strsep screws with the pointer,
    so when we kfree() it, we're not giving it the right pointer.

    Tested-by: Andy Lutomirski

    Signed-off-by: Chris Mason

    Josef Bacik
     
  • btrfs inialize rb trees in quite a number of places by settin rb_node =
    NULL; The problem with this is that 17d9ddc72fb8bba0d4f678 in the
    linux-next tree adds a new field to that struct which needs to be NULL for
    the new rbtree library code to work properly. This patch uses RB_ROOT as
    the intializer so all of the relevant fields will be NULL'd. Without the
    patch I get a panic.

    Signed-off-by: Eric Paris
    Acked-by: Venkatesh Pallipadi
    Signed-off-by: Chris Mason

    Eric Paris
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (62 commits)
    msi-laptop: depends on RFKILL
    msi-laptop: Detect 3G device exists by standard ec command
    msi-laptop: Add resume method for set the SCM load again
    msi-laptop: Support some MSI 3G netbook that is need load SCM
    msi-laptop: Add threeg sysfs file for support query 3G state by standard 66/62 ec command
    msi-laptop: Support standard ec 66/62 command on MSI notebook and nebook
    Driver core: create lock/unlock functions for struct device
    sysfs: fix for thinko with sysfs_bin_attr_init()
    sysfs: Kill unused sysfs_sb variable.
    sysfs: Pass super_block to sysfs_get_inode
    driver core: Use sysfs_rename_link in device_rename
    sysfs: Implement sysfs_rename_link
    sysfs: Pack sysfs_dirent more tightly.
    sysfs: Serialize updates to the vfs inode
    sysfs: windfarm: init sysfs attributes
    sysfs: Use sysfs_attr_init and sysfs_bin_attr_init on module dynamic attributes
    sysfs: Document sysfs_attr_init and sysfs_bin_attr_init
    sysfs: Use sysfs_attr_init and sysfs_bin_attr_init on dynamic attributes
    sysfs: Use one lockdep class per sysfs attribute.
    sysfs: Only take active references on attributes.
    ...

    Linus Torvalds
     

08 Mar, 2010

16 commits

  • Conflicts:
    Documentation/filesystems/proc.txt
    arch/arm/mach-u300/include/mach/debug-macro.S
    drivers/net/qlge/qlge_ethtool.c
    drivers/net/qlge/qlge_main.c
    drivers/net/typhoon.c

    Jiri Kosina
     
  • Remove the EXPERIMENTAL flag from FS-Cache so that Ubuntu can make use of the
    facility.

    Signed-off-by: Christian Kujau
    Signed-off-by: David Howells
    Signed-off-by: Linus Torvalds

    Christian Kujau
     
  • Now that there are no more users we can remove
    the sysfs_sb variable.

    Acked-by: Tejun Heo
    Acked-by: Serge Hallyn
    Signed-off-by: Eric W. Biederman
    Signed-off-by: Greg Kroah-Hartman

    Eric W. Biederman
     
  • Currently sysfs_get_inode magically returns an inode on
    sysfs_sb. Make the super_block parameter explicit and
    the code becomes clearer.

    Acked-by: Tejun Heo
    Acked-by: Serge Hallyn
    Signed-off-by: Eric W. Biederman
    Signed-off-by: Greg Kroah-Hartman

    Eric W. Biederman
     
  • Because of rename ordering problems we occassionally give false
    warnings about invalid sysfs operations. So using sysfs_rename
    create a sysfs_rename_link function that doesn't need strange
    workarounds.

    Cc: Benjamin Thery
    Cc: Daniel Lezcano
    Acked-by: Serge Hallyn
    Acked-by: Tejun Heo
    Signed-off-by: Eric W. Biederman
    Signed-off-by: Greg Kroah-Hartman

    Eric W. Biederman
     
  • Placing the 16bit s_mode between a pointer and a long doesn't pack well
    especailly on 64bit where we wast 48 bits. So move s_mode and
    declare it as a unsigned short. This is the sysfs backing store
    after all we don't need fields extra large just in case someday
    we want userspace to be able to use a larger value.

    Acked-by: Tejun Heo
    Signed-off-by: Eric W. Biederman
    Signed-off-by: Greg Kroah-Hartman

    Eric W. Biederman
     
  • The vfs depends upon filesystem methods to update the
    vfs inode. Sysfs adds to the normal number of places
    where the vfs inode is updated by also updatng the
    vfs inode in sysfs_refresh_inode.

    Typically the inode mutex is used to serialize updates
    to the vfs inode, but grabbing the inode mutex in
    sysfs_permission and sysfs_getattr causes deadlocks,
    because sometimes the vfs calls those operations with
    the inode mutex held. Therefore sysfs can not use the
    inode mutex to serial updates to the vfs inode.

    The sysfs_mutex is acquired in all of the routines
    where sysfs updates the vfs inode, and with a small
    change we can consistently protext sysfs vfs inode
    updates with the sysfs_mutex. To protect the sysfs
    vfs inode updates with the sysfs_mutex simply requires
    extending the scope of sysfs_mutex in sysfs_setattr
    over inode_setattr, and over inode_change_ok (so we
    have an unchanging inode when we perform the check).

    Acked-by: Serge Hallyn
    Signed-off-by: Eric W. Biederman
    Signed-off-by: Greg Kroah-Hartman

    Eric W. Biederman
     
  • Acknowledge that the logical sysfs rwsem has one instance per
    sysfs attribute with different locking depencencies for different
    attributes.

    There is a sysfs idiom where writing to one sysfs file causes the
    addition or removal of other sysfs files. Lumping all of the
    sysfs attributes together in one lock class causes lockdep to
    generate lots of false positives.

    This introduces the requirement that non-static sysfs attributes
    need to be initialized with sysfs_attr_init or sysfs_bin_attr_init.
    Strictly speaking this requirement only exists when lockdep is
    enabled, and when lockdep is enabled we get a bit fat warning
    if this requirement is not met.

    Signed-off-by: Eric W. Biederman
    Acked-by: WANG Cong
    Cc: Tejun Heo
    Signed-off-by: Greg Kroah-Hartman

    Eric W. Biederman
     
  • If we exclude directories and symlinks from the set of sysfs
    dirents where we need active references we are left with
    sysfs attributes (binary or not).

    - Tweak sysfs_deactivate to only do something on attributes
    - Move lockdep initialization into sysfs_file_add_mode to
    limit it to just attributes.

    Signed-off-by: Eric W. Biederman
    Acked-by: WANG Cong
    Cc: Tejun Heo
    Signed-off-by: Greg Kroah-Hartman

    Eric W. Biederman
     
  • It turns out that holding an active reference on a directory is
    pointless. The purpose of the active references are to allows us to
    block when removing sysfs entries that have custom methods so we don't
    remove modules while running modular code and to keep those custom
    methods from accessing data structures after the files have been
    removed. Further sysfs_remove_dir remove all elements in the
    directory before removing the directory itself, so there is no chance
    we will remove a directory with active children.

    Signed-off-by: Eric W. Biederman
    Cc: Tejun Heo
    Signed-off-by: Greg Kroah-Hartman

    Eric W. Biederman
     
  • Constify struct sysfs_ops.

    This is part of the ops structure constification
    effort started by Arjan van de Ven et al.

    Benefits of this constification:

    * prevents modification of data that is shared
    (referenced) by many other structure instances
    at runtime

    * detects/prevents accidental (but not intentional)
    modification attempts on archs that enforce
    read-only kernel data at runtime

    * potentially better optimized code as the compiler
    can assume that the const data cannot be changed

    * the compiler/linker move const data into .rodata
    and therefore exclude them from false sharing

    Signed-off-by: Emese Revfy
    Acked-by: David Teigland
    Acked-by: Matt Domsch
    Acked-by: Maciej Sosnowski
    Acked-by: Hans J. Koch
    Acked-by: Pekka Enberg
    Acked-by: Jens Axboe
    Acked-by: Stephen Hemminger
    Signed-off-by: Greg Kroah-Hartman

    Emese Revfy
     
  • Constify struct kset_uevent_ops.

    This is part of the ops structure constification
    effort started by Arjan van de Ven et al.

    Benefits of this constification:

    * prevents modification of data that is shared
    (referenced) by many other structure instances
    at runtime

    * detects/prevents accidental (but not intentional)
    modification attempts on archs that enforce
    read-only kernel data at runtime

    * potentially better optimized code as the compiler
    can assume that the const data cannot be changed

    * the compiler/linker move const data into .rodata
    and therefore exclude them from false sharing

    Signed-off-by: Emese Revfy
    Signed-off-by: Greg Kroah-Hartman

    Emese Revfy
     
  • When sysfs_readdir stops short we now cache the next
    sysfs_dirent to return to user space in filp->private_data.
    There is no impact on the rest of sysfs by doing this and
    in the common case it allows us to pick up exactly where
    we left off with no seeking.

    Additionally I drop and regrab the sysfs_mutex around
    filldir to avoid a page fault abritrarily increasing the
    hold time on the sysfs_mutex.

    v2: Returned to using INT_MAX as the EOF condition.
    seekdir is ambiguous unless all directory entries have
    a unique f_pos value.

    Fixes http://bugzilla.kernel.org/show_bug.cgi?id=14949

    Signed-off-by: Eric W. Biederman
    Cc: Linus Torvalds
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Eric W. Biederman
     
  • Adding/Removing a whole array of attributes is very common. Add a standard
    utility function to do this with a simple function call, instead of
    requiring drivers to open code this.

    Signed-off-by: Andi Kleen
    Signed-off-by: Greg Kroah-Hartman

    Andi Kleen
     
  • Fix kernel-doc notation in new seq-file functions and
    correct spelling.

    Signed-off-by: Randy Dunlap
    Cc: Li Zefan
    Cc: Alexander Viro
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • This reverts commit a069c266ae5fdfbf5b4aecf2c672413aa33b2504.

    It turns ou that not only was it missing a case (XFS) that needed it,
    but perhaps more importantly, people sometimes want to enable new
    modules that they hadn't had enabled before, and if such a module uses
    list_sort(), it can't easily be inserted any more.

    So rather than add a "select LIST_SORT" to the XFS case, just leave it
    compiled in. It's not all _that_ big, after all, and the inconvenience
    isn't worth it.

    Requested-by: Alexey Dobriyan
    Cc: Christoph Hellwig
    Cc: Don Mullis
    Cc: Andrew Morton
    Cc: Dave Chinner
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

07 Mar, 2010

6 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/joern/logfs:
    [LogFS] Change magic number
    [LogFS] Remove h_version field
    [LogFS] Check feature flags
    [LogFS] Only write journal if dirty
    [LogFS] Fix bdev erases
    [LogFS] Silence gcc
    [LogFS] Prevent 64bit divisions in hash_index
    [LogFS] Plug memory leak on error paths
    [LogFS] Add MAINTAINERS entry
    [LogFS] add new flash file system

    Fixed up trivial conflict in lib/Kconfig, and a semantic conflict in
    fs/logfs/inode.c introduced by write_inode() being changed to use
    writeback_control' by commit a9185b41a4f84971b930c519f0c63bd450c4810d
    ("pass writeback_control to ->write_inode")

    Linus Torvalds
     
  • * 'for-linus' of git://oss.sgi.com/xfs/xfs: (21 commits)
    xfs: return inode fork offset in bulkstat for fsr
    xfs: Increase the default size of the reserved blocks pool
    xfs: truncate delalloc extents when IO fails in writeback
    xfs: check for more work before sleeping in xfssyncd
    xfs: Fix a build warning in xfs_aops.c
    xfs: fix locking for inode cache radix tree tag updates
    xfs: remove xfs_ipin/xfs_iunpin
    xfs: cleanup xfs_iunpin_wait/xfs_iunpin_nowait
    xfs: kill xfs_lrw.h
    xfs: factor common xfs_trans_bjoin code
    xfs: stop passing opaque handles to xfs_log.c routines
    xfs: split xfs_bmap_btalloc
    xfs: fix xfs_fsblock_t tracing
    xfs: fix inode pincount check in fsync
    xfs: Non-blocking inode locking in IO completion
    xfs: implement optimized fdatasync
    xfs: remove wrapper for the fsync file operation
    xfs: remove wrappers for read/write file operations
    xfs: merge xfs_lrw.c into xfs_file.c
    xfs: fix dquota trace format
    ...

    Linus Torvalds
     
  • * 'for-2.6.34' of git://linux-nfs.org/~bfields/linux: (22 commits)
    nfsd4: fix minor memory leak
    svcrpc: treat uid's as unsigned
    nfsd: ensure sockets are closed on error
    Revert "sunrpc: move the close processing after do recvfrom method"
    Revert "sunrpc: fix peername failed on closed listener"
    sunrpc: remove unnecessary svc_xprt_put
    NFSD: NFSv4 callback client should use RPC_TASK_SOFTCONN
    xfs_export_operations.commit_metadata
    commit_metadata export operation replacing nfsd_sync_dir
    lockd: don't clear sm_monitored on nsm_reboot_lookup
    lockd: release reference to nsm_handle in nlm_host_rebooted
    nfsd: Use vfs_fsync_range() in nfsd_commit
    NFSD: Create PF_INET6 listener in write_ports
    SUNRPC: NFS kernel APIs shouldn't return ENOENT for "transport not found"
    SUNRPC: Bury "#ifdef IPV6" in svc_create_xprt()
    NFSD: Support AF_INET6 in svc_addsock() function
    SUNRPC: Use rpc_pton() in ip_map_parse()
    nfsd: 4.1 has an rfc number
    nfsd41: Create the recovery entry for the NFSv4.1 client
    nfsd: use vfs_fsync for non-directories
    ...

    Linus Torvalds
     
  • Modify uid check in do_coredump so as to not apply it in the case of
    pipes.

    This just got noticed in testing. The end of do_coredump validates the
    uid of the inode for the created file against the uid of the crashing
    process to ensure that no one can pre-create a core file with different
    ownership and grab the information contained in the core when they
    shouldn' tbe able to. This causes failures when using pipes for a core
    dumps if the crashing process is not root, which is the uid of the pipe
    when it is created.

    The fix is simple. Since the check for matching uid's isn't relevant for
    pipes (a process can't create a pipe that the uermodehelper code will open
    anyway), we can just just skip it in the event ispipe is non-zero

    Reverts a pipe-affecting change which was accidentally made in

    : commit c46f739dd39db3b07ab5deb4e3ec81e1c04a91af
    : Author: Ingo Molnar
    : AuthorDate: Wed Nov 28 13:59:18 2007 +0100
    : Commit: Linus Torvalds
    : CommitDate: Wed Nov 28 10:58:01 2007 -0800
    :
    : vfs: coredumping fix

    Signed-off-by: Neil Horman
    Cc: Andi Kleen
    Cc: Oleg Nesterov
    Cc: Alan Cox
    Cc: Al Viro
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Neil Horman
     
  • User visible change.

    do_coredump() kills all threads which share the same ->mm but only the
    coredumping process gets the proper exit_code. Other tasks which share
    the same ->mm die "silently" and return status == 0 to parent.

    This is historical behaviour, not actually a bug. But I think Frank
    Heckenbach rightly dislikes the current behaviour. Simple test-case:

    #include
    #include
    #include
    #include

    int main(void)
    {
    int stat;

    if (!fork()) {
    if (!vfork())
    kill(getpid(), SIGQUIT);
    }

    wait(&stat);
    printf("stat=%x\n", stat);
    return 0;
    }

    Before this patch it prints "stat=0" despite the fact the child was killed
    by SIGQUIT. After this patch the output is "stat=3" which obviously makes
    more sense.

    Even with this patch, only the task which originates the coredumping gets
    "|= 0x80" if the core was actually dumped, but at least the coredumping
    signal is visible to do_wait/etc.

    Reported-by: Frank Heckenbach
    Signed-off-by: Oleg Nesterov
    Acked-by: WANG Cong
    Cc: Roland McGrath
    Cc: Neil Horman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • Pass mm->flags as a coredump parameter for consistency.

    ---
    1787 if (mm->core_state || !get_dumpable(mm)) { mmap_sem);
    1789 put_cred(cred);
    1790 goto fail;
    1791 }
    1792
    [...]
    1798 if (get_dumpable(mm) == 2) { /* Setuid core dump mode */ fsuid = 0; /* Dump root private */
    1801 }
    ---

    Since dumpable bits are not protected by lock, there is a chance to change
    these bits between (1) and (2).

    To solve this issue, this patch copies mm->flags to
    coredump_params.mm_flags at the beginning of do_coredump() and uses it
    instead of get_dumpable() while dumping core.

    This copy is also passed to binfmt->core_dump, since elf*_core_dump() uses
    dump_filter bits in mm->flags.

    [akpm@linux-foundation.org: fix merge]
    Signed-off-by: Masami Hiramatsu
    Acked-by: Roland McGrath
    Cc: Hidehiro Kawai
    Cc: Oleg Nesterov
    Cc: Ingo Molnar
    Reviewed-by: KOSAKI Motohiro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Masami Hiramatsu