03 Nov, 2011

2 commits

  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/vfs-queue:
    vfs: add d_prune dentry operation
    vfs: protect i_nlink
    filesystems: add set_nlink()
    filesystems: add missing nlink wrappers
    logfs: remove unnecessary nlink setting
    ocfs2: remove unnecessary nlink setting
    jfs: remove unnecessary nlink setting
    hypfs: remove unnecessary nlink setting
    vfs: ignore error on forced remount
    readlinkat: ensure we return ENOENT for the empty pathname for normal lookups
    vfs: fix dentry leak in simple_fill_super()

    Linus Torvalds
     
  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
    udf: Cleanup metadata flags handling
    udf: Skip mirror metadata FE loading when metadata FE is ok
    ext3: Allow quota file use root reservation
    udf: Remove web reference from UDF MAINTAINERS entry
    quota: Drop path reference on error exit from quotactl
    udf: Neaten udf_debug uses
    udf: Neaten logging output, use vsprintf extension %pV
    udf: Convert printks to pr_
    udf: Rename udf_warning to udf_warn
    udf: Rename udf_error to udf_err
    udf: Promote some debugging messages to udf_error
    ext3: Remove the obsolete broken EXT3_IOC32_WAIT_FOR_READONLY.
    udf: Add readpages support for udf.
    ext3/balloc.c: local functions should be static
    ext2: fix the outdated comment in ext2_nfs_get_inode()
    ext3: remove deprecated oldalloc
    fs/ext3/balloc.c: delete useless initialization
    fs/ext2/balloc.c: delete useless initialization
    ext3: fix message in ext3_remount for rw-remount case
    ext3: Remove i_mutex from ext3_sync_file()

    Fix up trivial (printf format cleanup) conflicts in fs/udf/udfdecl.h

    Linus Torvalds
     

02 Nov, 2011

2 commits


01 Nov, 2011

1 commit

  • Standardize the style for compiler based printf format verification.
    Standardized the location of __printf too.

    Done via script and a little typing.

    $ grep -rPl --include=*.[ch] -w "__attribute__" * | \
    grep -vP "^(tools|scripts|include/linux/compiler-gcc.h)" | \
    xargs perl -n -i -e 'local $/; while (<>) { s/\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf\s*,\s*(.+)\s*,\s*(.+)\s*\)\s*\)\s*\)/__printf($1, $2)/g ; print; }'

    [akpm@linux-foundation.org: revert arch bits]
    Signed-off-by: Joe Perches
    Cc: "Kirill A. Shutemov"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     

30 Aug, 2011

1 commit


17 Aug, 2011

1 commit

  • Delete nontrivial initialization that is immediately overwritten by the
    result of an allocation function.

    The semantic match that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @@
    type T;
    identifier i;
    expression e;
    @@

    (
    T i = \(0\|NULL\|ERR_PTR(...)\);
    |
    -T i = e;
    +T i;
    )
    ... when != i
    i = \(kzalloc\|kcalloc\|kmalloc\)(...);

    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Jan Kara

    Julia Lawall
     

09 Aug, 2011

1 commit


02 Aug, 2011

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
    xfs: Fix build breakage in xfs_iops.c when CONFIG_FS_POSIX_ACL is not set
    VFS: Reorganise shrink_dcache_for_umount_subtree() after demise of dcache_lock
    VFS: Remove dentry->d_lock locking from shrink_dcache_for_umount_subtree()
    VFS: Remove detached-dentry counter from shrink_dcache_for_umount_subtree()
    switch posix_acl_chmod() to umode_t
    switch posix_acl_from_mode() to umode_t
    switch posix_acl_equiv_mode() to umode_t *
    switch posix_acl_create() to umode_t *
    block: initialise bd_super in bdget()
    vfs: avoid call to inode_lru_list_del() if possible
    vfs: avoid taking inode_hash_lock on pipes and sockets
    vfs: conditionally call inode_wb_list_del()
    VFS: Fix automount for negative autofs dentries
    Btrfs: load the key from the dir item in readdir into a fake dentry
    devtmpfs: missing initialialization in never-hit case
    hppfs: missing include

    Linus Torvalds
     

01 Aug, 2011

2 commits


30 Jul, 2011

1 commit

  • When commit 4e34e719e457 ("fs: take the ACL checks to common code")
    changed the xyz_check_acl() functions into the more natural
    xyz_get_acl() interface, we grew two copies of the

    #define ext2_get_acl NULL

    define for the non-acl case.

    Remove the extra one.

    Reported-by: Marco Stornelli
    Cc: Christoph Hellwig
    Cc: Al Viro
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

27 Jul, 2011

1 commit

  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6:
    jbd: change the field "b_cow_tid" of struct journal_head from type unsigned to tid_t
    ext3.txt: update the links in the section "useful links" to the latest ones
    ext3: Fix data corruption in inodes with journalled data
    ext2: check xattr name_len before acquiring xattr_sem in ext2_xattr_get
    ext3: Fix compilation with -DDX_DEBUG
    quota: Remove unused declaration
    jbd: Use WRITE_SYNC in journal checkpoint.
    jbd: Fix oops in journal_remove_journal_head()
    ext3: Return -EINVAL when start is beyond the end of fs in ext3_trim_fs()
    ext3/ioctl.c: silence sparse warnings about different address spaces
    ext3/ext4 Documentation: remove bh/nobh since it has been deprecated
    ext3: Improve truncate error handling
    ext3: use proper little-endian bitops
    ext2: include fs.h into ext2_fs.h
    ext3: Fix oops in ext3_try_to_allocate_with_rsv()
    jbd: fix a bug of leaking jh->b_jcount
    jbd: remove dependency on __GFP_NOFAIL
    ext3: Convert ext3 to new truncate calling convention
    jbd: Add fixed tracepoints
    ext3: Add fixed tracepoints

    Resolve conflicts in fs/ext3/fsync.c due to fsync locking push-down and
    new fixed tracepoints.

    Linus Torvalds
     

26 Jul, 2011

4 commits

  • Replace the ->check_acl method with a ->get_acl method that simply reads an
    ACL from disk after having a cache miss. This means we can replace the ACL
    checking boilerplate code with a single implementation in namei.c.

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

    Christoph Hellwig
     
  • new helper: posix_acl_create(&acl, gfp, mode_p). Replaces acl with
    modified clone, on failure releases acl and replaces with NULL.
    Returns 0 or -ve on error. All callers of posix_acl_create_masq()
    switched.

    Signed-off-by: Al Viro

    Al Viro
     
  • new helper: posix_acl_chmod(&acl, gfp, mode). Replaces acl with modified
    clone or with NULL if that has failed; returns 0 or -ve on error. All
    callers of posix_acl_chmod_masq() switched to that - they'd been doing
    exactly the same thing.

    Signed-off-by: Al Viro

    Al Viro
     
  • This moves logic for checking the cached ACL values from low-level
    filesystems into generic code. The end result is a streamlined ACL
    check that doesn't need to load the inode->i_op->check_acl pointer at
    all for the common cached case.

    The filesystems also don't need to check for a non-blocking RCU walk
    case in their acl_check() functions, because that is all handled at a
    VFS layer.

    Signed-off-by: Linus Torvalds
    Signed-off-by: Al Viro

    Linus Torvalds
     

23 Jul, 2011

1 commit


21 Jul, 2011

3 commits

  • Btrfs needs to be able to control how filemap_write_and_wait_range() is called
    in fsync to make it less of a painful operation, so push down taking i_mutex and
    the calling of filemap_write_and_wait() down into the ->fsync() handlers. Some
    file systems can drop taking the i_mutex altogether it seems, like ext3 and
    ocfs2. For correctness sake I just pushed everything down in all cases to make
    sure that we keep the current behavior the same for everybody, and then each
    individual fs maintainer can make up their mind about what to do from there.
    Thanks,

    Acked-by: Jan Kara
    Signed-off-by: Josef Bacik
    Signed-off-by: Al Viro

    Josef Bacik
     
  • Simple filesystems always pass inode->i_sb_bdev as the block device
    argument, and never need a end_io handler. Let's simply things for
    them and for my grepping activity by dropping these arguments. The
    only thing not falling into that scheme is ext4, which passes and
    end_io handler without needing special flags (yet), but given how
    messy the direct I/O code there is use of __blockdev_direct_IO
    in one instead of two out of three cases isn't going to make a large
    difference anyway.

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

    Christoph Hellwig
     
  • Let filesystems handle waiting for direct I/O requests themselves instead
    of doing it beforehand. This means filesystem-specific locks to prevent
    new dio referenes from appearing can be held. This is important to allow
    generalizing i_dio_count to non-DIO_LOCKING filesystems.

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

    Christoph Hellwig
     

20 Jul, 2011

3 commits


19 Jul, 2011

1 commit

  • This patch changes the security_inode_init_security API by adding a
    filesystem specific callback to write security extended attributes.
    This change is in preparation for supporting the initialization of
    multiple LSM xattrs and the EVM xattr. Initially the callback function
    walks an array of xattrs, writing each xattr separately, but could be
    optimized to write multiple xattrs at once.

    For existing security_inode_init_security() calls, which have not yet
    been converted to use the new callback function, such as those in
    reiserfs and ocfs2, this patch defines security_old_inode_init_security().

    Signed-off-by: Mimi Zohar

    Mimi Zohar
     

17 May, 2011

1 commit

  • When ext2 mounts a filesystem, it attempts to set the block device
    blocksize with a call to sb_set_blocksize, which can fail for
    several reasons. The current failure message in ext2 prints:

    EXT2-fs (loop1): error: blocksize is too small

    which is not correct in all cases. This can be demonstrated
    by creating a filesystem with

    # mkfs.ext2 -b 8192

    on a 4k page system, and attempting to mount it.

    Change the error message to a more generic:

    EXT2-fs (loop1): bad blocksize 8192

    to match the error message in ext3.

    Signed-off-by: Robin Dong
    Reviewed-by: Coly Li
    Reviewed-by: Eric Sandeen
    Signed-off-by: Jan Kara

    Robin Dong
     

31 Mar, 2011

1 commit


25 Mar, 2011

1 commit

  • * 'for-2.6.39/core' of git://git.kernel.dk/linux-2.6-block: (65 commits)
    Documentation/iostats.txt: bit-size reference etc.
    cfq-iosched: removing unnecessary think time checking
    cfq-iosched: Don't clear queue stats when preempt.
    blk-throttle: Reset group slice when limits are changed
    blk-cgroup: Only give unaccounted_time under debug
    cfq-iosched: Don't set active queue in preempt
    block: fix non-atomic access to genhd inflight structures
    block: attempt to merge with existing requests on plug flush
    block: NULL dereference on error path in __blkdev_get()
    cfq-iosched: Don't update group weights when on service tree
    fs: assign sb->s_bdi to default_backing_dev_info if the bdi is going away
    block: Require subsystems to explicitly allocate bio_set integrity mempool
    jbd2: finish conversion from WRITE_SYNC_PLUG to WRITE_SYNC and explicit plugging
    jbd: finish conversion from WRITE_SYNC_PLUG to WRITE_SYNC and explicit plugging
    fs: make fsync_buffers_list() plug
    mm: make generic_writepages() use plugging
    blk-cgroup: Add unaccounted time to timeslice_used.
    block: fixup plugging stubs for !CONFIG_BLOCK
    block: remove obsolete comments for blkdev_issue_zeroout.
    blktrace: Use rq->cmd_flags directly in blk_add_trace_rq.
    ...

    Fix up conflicts in fs/{aio.c,super.c}

    Linus Torvalds
     

24 Mar, 2011

2 commits


10 Mar, 2011

1 commit

  • Code has been converted over to the new explicit on-stack plugging,
    and delay users have been converted to use the new API for that.
    So lets kill off the old plugging along with aops->sync_page().

    Signed-off-by: Jens Axboe

    Jens Axboe
     

08 Mar, 2011

1 commit


02 Mar, 2011

1 commit

  • vfs_rename_other() does not lock renamed inode with i_mutex. Thus changing
    i_nlink in a non-atomic manner (which happens in ext2_rename()) can corrupt
    it as reported and analyzed by Josh.

    In fact, there is no good reason to mess with i_nlink of the moved file.
    We did it presumably to simulate linking into the new directory and unlinking
    from an old one. But the practical effect of this is disputable because fsck
    can possibly treat file as being properly linked into both directories without
    writing any error which is confusing. So we just stop increment-decrement
    games with i_nlink which also fixes the corruption.

    CC: stable@kernel.org
    CC: Al Viro
    Signed-off-by: Josh Hunt
    Signed-off-by: Jan Kara

    Josh Hunt
     

02 Feb, 2011

1 commit

  • SELinux would like to implement a new labeling behavior of newly created
    inodes. We currently label new inodes based on the parent and the creating
    process. This new behavior would also take into account the name of the
    new object when deciding the new label. This is not the (supposed) full path,
    just the last component of the path.

    This is very useful because creating /etc/shadow is different than creating
    /etc/passwd but the kernel hooks are unable to differentiate these
    operations. We currently require that userspace realize it is doing some
    difficult operation like that and than userspace jumps through SELinux hoops
    to get things set up correctly. This patch does not implement new
    behavior, that is obviously contained in a seperate SELinux patch, but it
    does pass the needed name down to the correct LSM hook. If no such name
    exists it is fine to pass NULL.

    Signed-off-by: Eric Paris

    Eric Paris
     

12 Jan, 2011

2 commits

  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (44 commits)
    ext4: fix trimming starting with block 0 with small blocksize
    ext4: revert buggy trim overflow patch
    ext4: don't pass entire map to check_eofblocks_fl
    ext4: fix memory leak in ext4_free_branches
    ext4: remove ext4_mb_return_to_preallocation()
    ext4: flush the i_completed_io_list during ext4_truncate
    ext4: add error checking to calls to ext4_handle_dirty_metadata()
    ext4: fix trimming of a single group
    ext4: fix uninitialized variable in ext4_register_li_request
    ext4: dynamically allocate the jbd2_inode in ext4_inode_info as necessary
    ext4: drop i_state_flags on architectures with 64-bit longs
    ext4: reorder ext4_inode_info structure elements to remove unneeded padding
    ext4: drop ec_type from the ext4_ext_cache structure
    ext4: use ext4_lblk_t instead of sector_t for logical blocks
    ext4: replace i_delalloc_reserved_flag with EXT4_STATE_DELALLOC_RESERVED
    ext4: fix 32bit overflow in ext4_ext_find_goal()
    ext4: add more error checks to ext4_mkdir()
    ext4: ext4_ext_migrate should use NULL not 0
    ext4: Use ext4_error_file() to print the pathname to the corrupted inode
    ext4: use IS_ERR() to check for errors in ext4_error_file
    ...

    Linus Torvalds
     
  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6:
    ext2: Resolve 'dereferencing pointer to incomplete type' when enabling EXT2_XATTR_DEBUG
    ext3: Remove redundant unlikely()
    ext2: Remove redundant unlikely()
    ext3: speed up file creates by optimizing rec_len functions
    ext2: speed up file creates by optimizing rec_len functions
    ext3: Add more journal error check
    ext3: Add journal error check in resize.c
    quota: Use %pV and __attribute__((format (printf in __quota_error and fix fallout
    ext3: Add FITRIM handling
    ext3: Add batched discard support for ext3
    ext3: Add journal error check into ext3_rename()
    ext3: Use search_dirblock() in ext3_dx_find_entry()
    ext3: Avoid uninitialized memory references with a corrupted htree directory
    ext3: Return error code from generic_check_addressable
    ext3: Add journal error check into ext3_delete_entry()
    ext3: Add error check in ext3_mkdir()
    fs/ext3/super.c: Use printf extension %pV
    fs/ext2/super.c: Use printf extension %pV
    ext3: don't update sb journal_devnum when RO dev

    Linus Torvalds
     

11 Jan, 2011

4 commits