18 May, 2010

3 commits


14 May, 2010

2 commits


12 May, 2010

2 commits

  • CIFS has stubs for XFS-style quotas without an actual implementation backing
    them, hidden behind a config option not visible in Kconfig. Remove these
    stubs for now as the quota operations will see some major changes and this
    code simply gets in the way.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Jeff Layton
    Signed-off-by: Jan Kara
    Signed-off-by: Steve French

    Steve French
     
  • When we made serverino the default, we trusted that the field sent by the
    server in the "uniqueid" field was actually unique. It turns out that it
    isn't reliably so.

    Samba, in particular, will just put the st_ino in the uniqueid field when
    unix extensions are enabled. When a share spans multiple filesystems, it's
    quite possible that there will be collisions. This is a server bug, but
    when the inodes in question are a directory (as is often the case) and
    there is a collision with the root inode of the mount, the result is a
    kernel panic on umount.

    Fix this by checking explicitly for directory inodes with the same
    uniqueid. If that is the case, then we can assume that using server inode
    numbers will be a problem and that they should be disabled.

    Fixes Samba bugzilla 7407

    Signed-off-by: Jeff Layton
    CC: Stable
    Reviewed-and-Tested-by: Suresh Jayaraman
    Signed-off-by: Steve French

    Jeff Layton
     

11 May, 2010

2 commits


10 May, 2010

1 commit


06 May, 2010

3 commits


28 Apr, 2010

1 commit


27 Apr, 2010

7 commits


23 Apr, 2010

1 commit


22 Apr, 2010

2 commits

  • This ensures that dirty data gets flushed properly.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • When process does fork() private_data of files with lock list stays the same
    for file descriptors of the parent and of the child. While finishing the child closes
    files and deletes locks from the list even if unlocking fails. When the child process
    finishes the parent doesn't have lock in lock list and can't unlock previously before
    fork() locked region after the child process finished.

    This patch provides behaviour to save locks in lock list if unlocking fails.

    Signed-off-by: Pavel Shilovsky
    Reviewed-by: Jeff Layton
    Signed-off-by: Steve French

    Pavel Shilovsky
     

21 Apr, 2010

3 commits

  • Signed-off-by: Steve French

    Steve French
     
  • Neaten cERROR and cFYI macros, reduce text space
    ~2.5K

    Convert '__FILE__ ": " fmt' to '"%s: " fmt', __FILE__' to save text space
    Surround macros with do {} while
    Add parentheses to macros
    Make statement expression macro from macro with assign
    Remove now unnecessary parentheses from cFYI and cERROR uses

    defconfig with CIFS support old
    $ size fs/cifs/built-in.o
    text data bss dec hex filename
    156012 1760 148 157920 268e0 fs/cifs/built-in.o

    defconfig with CIFS support old
    $ size fs/cifs/built-in.o
    text data bss dec hex filename
    153508 1760 148 155416 25f18 fs/cifs/built-in.o

    allyesconfig old:
    $ size fs/cifs/built-in.o
    text data bss dec hex filename
    309138 3864 74824 387826 5eaf2 fs/cifs/built-in.o

    allyesconfig new
    $ size fs/cifs/built-in.o
    text data bss dec hex filename
    305655 3864 74824 384343 5dd57 fs/cifs/built-in.o

    Signed-off-by: Joe Perches
    Signed-off-by: Steve French

    Joe Perches
     
  • add_to_page_cache_lru is exported, so it should be used. Benefits over
    using a private pagevec: neater code, 128 bytes fewer stack used, percpu
    lru ordering is preserved, and finally don't need to flush pagevec
    before returning so batching may be shared with other LRU insertions.

    Signed-off-by: Nick Piggin
    Reviewed-by: Dave Kleikamp
    Signed-off-by: Steve French

    Nick Piggin
     

09 Apr, 2010

1 commit


07 Apr, 2010

1 commit

  • If we have preventing lock, cifs should overwrite file_lock structure
    with info about preventing lock. If we haven't preventing lock, cifs
    should leave it unchanged except for the lock type (change it to F_UNLCK).

    Signed-off-by: Pavel Shilovsky
    Reviewed-by: Jeff Layton
    Signed-off-by: Steve French

    Pavel Shilovsky
     

04 Apr, 2010

2 commits

  • While chasing a bug report involving a OS/2 server, I noticed the server sets
    pSMBr->CountHigh to a incorrect value even in case of normal writes. This
    results in 'nbytes' being computed wrongly and triggers a kernel BUG at
    mm/filemap.c.

    void iov_iter_advance(struct iov_iter *i, size_t bytes)
    {
    BUG_ON(i->count < bytes);
    Reviewed-by: Jeff Layton
    Signed-off-by: Suresh Jayaraman
    Signed-off-by: Steve French

    Suresh Jayaraman
     
  • By doing this we always overwrite nbytes value that is being passed on to
    CIFSSMBWrite() and need not rely on the callers to initialize. CIFSSMBWrite2 is
    doing this already.

    CC: Stable
    Reviewed-by: Shirish Pargaonkar
    Reviewed-by: Jeff Layton
    Signed-off-by: Suresh Jayaraman
    Signed-off-by: Steve French

    Steve French
     

30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

27 Mar, 2010

1 commit


20 Mar, 2010

1 commit


15 Mar, 2010

1 commit


10 Mar, 2010

2 commits


08 Mar, 2010

1 commit


06 Mar, 2010

2 commits

  • ...to allow us to get unix attrs via filehandle.

    Signed-off-by: Jeff Layton
    Signed-off-by: Steve French

    Jeff Layton
     
  • ...to get inode attributes via filehandle instead of by path.

    In some places, we need to revalidate an inode on an open filehandle,
    but we can't necessarily guarantee that the dentry associated with it
    will still be valid. When we have an open filehandle already, it makes
    more sense to do a filehandle based operation anyway.

    Signed-off-by: Jeff Layton
    Signed-off-by: Steve French

    Jeff Layton