15 Mar, 2010

2 commits


14 Mar, 2010

7 commits


13 Mar, 2010

13 commits

  • While investigating a bug, I came across a possible bug in v9fs. The
    problem is similar to the one reported for NFS by ASANO Masahiro in
    http://lkml.org/lkml/2005/12/21/334.

    v9fs_file_lock() will skip locks on file which has mode set to 02666.
    This is a problem in cases where the mode of the file is changed after
    a process has obtained a lock on the file. Such a lock will be skipped
    during unlock and the machine will end up with a BUG in
    locks_remove_flock().

    v9fs_file_lock() should skip the check for mandatory locks when
    unlocking a file.

    Signed-off-by: Sachin Prabhu
    Signed-off-by: Eric Van Hensbergen

    Sachin Prabhu
     
  • Fixes a simple bug so that large files beyond 2GB can be created.

    Signed-off-by: Venkateswararao Jujjuri
    Signed-off-by: Badari Pulavarty
    Signed-off-by: Eric Van Hensbergen

    jvrao
     
  • This patch changes the name of the new 9P protocol from 9p2010.L to
    9p2000.u. This is because we learnt that the name 9p2010 is already
    being used by others.

    Signed-off-by: Sripathi Kodi
    Signed-off-by: Eric Van Hensbergen

    Sripathi Kodi
     
  • This ensure that on failure when we free the stat buf we don't end up
    freeing an already freed pointer in the earlier loop

    Signed-off-by: Aneesh Kumar K.V
    Signed-off-by: Sripathi Kodi
    Signed-off-by: Eric Van Hensbergen

    Aneesh Kumar K.V
     
  • * 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
     

12 Mar, 2010

1 commit

  • gfs2_lock() will skip locks on file which have mode set to 02666. This is a problem in cases where the mode of the file is changed after a process has obtained a lock on the file. Such a lock will be skipped and will result in a BUG in locks_remove_flock().

    gfs2_lock() should skip the check for mandatory locks when unlocking a file.

    Signed-off-by: Sachin Prabhu
    Signed-off-by: Steven Whitehouse

    Sachin Prabhu
     

11 Mar, 2010

1 commit

  • GFS2 tracks the number of revokes and unrevokes that are part of committed
    transactions via sd_log_commited_revoke. It is possible for one process to add
    revokes during its transaction, while another process unrevokes them during its
    transaction. If the second process finishes its transaction first,
    sd_log_commited_revoke will be decremented by the number of unrevokes that the
    second process did, without first being incremented by the number of revokes
    the first process did. This is fine, since all started transactions must be
    completed before the journal can be flushed. However, sd_log_commited_revoke
    is an unsigned integer, and log_refund() causes an assertion failure if it
    would go negative at the end of a transaction. This patch makes
    sd_log_commited_revoke a signed integer and allows it to go negative.
    __gfs2_log_flush() still checks that it mataches the actual number of revokes.

    Signed-off-by: Benjamin Marzinski
    Signed-off-by: Steven Whitehouse

    Benjamin Marzinski
     

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

5 commits

  • gfs2 only needs the quotactl code, not the generic quota implementation.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Steven Whitehouse

    Christoph Hellwig
     
  • * 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

8 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