04 Jan, 2012

3 commits


02 Nov, 2011

1 commit


07 Jul, 2011

1 commit

  • hfs_find_init() may fail with ENOMEM, but there are places, where
    the returned value is not checked. The consequences can be very
    unpleasant, e.g. kfree uninitialized pointer and
    inappropriate mutex unlocking.

    The patch adds checks for errors in hfs_find_init().

    Found by Linux Driver Verification project (linuxtesting.org).

    Signed-off-by: Alexey Khoroshilov
    Signed-off-by: Christoph Hellwig

    Alexey Khoroshilov
     

28 May, 2011

1 commit


26 May, 2011

2 commits


13 Jan, 2011

1 commit


08 Jan, 2011

1 commit

  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/hfsplus:
    hfsplus: %L-to-%ll, macro correction, and remove unneeded braces
    hfsplus: spaces/indentation clean-up
    hfsplus: C99 comments clean-up
    hfsplus: over 80 character lines clean-up
    hfsplus: fix an artifact in ioctl flag checking
    hfsplus: flush disk caches in sync and fsync
    hfsplus: optimize fsync
    hfsplus: split up inode flags
    hfsplus: write up fsync for directories
    hfsplus: simplify fsync
    hfsplus: avoid useless work in hfsplus_sync_fs
    hfsplus: make sure sync writes out all metadata
    hfsplus: use raw bio access for partition tables
    hfsplus: use raw bio access for the volume headers
    hfsplus: always use hfsplus_sync_fs to write the volume header
    hfsplus: silence a few debug printks
    hfsplus: fix option parsing during remount

    Fix up conflicts due to VFS changes in fs/hfsplus/{hfsplus_fs.h,unicode.c}

    Linus Torvalds
     

07 Jan, 2011

1 commit

  • Reduce some branches and memory accesses in dcache lookup by adding dentry
    flags to indicate common d_ops are set, rather than having to check them.
    This saves a pointer memory access (dentry->d_op) in common path lookup
    situations, and saves another pointer load and branch in cases where we
    have d_op but not the particular operation.

    Patched with:

    git grep -E '[.>]([[:space:]])*d_op([[:space:]])*=' | xargs sed -e 's/\([^\t ]*\)->d_op = \(.*\);/d_set_d_op(\1, \2);/' -e 's/\([^\t ]*\)\.d_op = \(.*\);/d_set_d_op(\&\1, \2);/' -i

    Signed-off-by: Nick Piggin

    Nick Piggin
     

17 Dec, 2010

2 commits


23 Nov, 2010

1 commit


29 Oct, 2010

1 commit


27 Oct, 2010

1 commit


26 Oct, 2010

1 commit


14 Oct, 2010

2 commits

  • Make sure the initial insertation of the catalog entry already contains
    the device number by calling init_special_inode early and setting writing
    out the dev field of the on-disk permission structure. The latter is
    facilitated by sharing the almost identical hfsplus_set_perms helpers
    between initial catalog entry creating and ->write_inode.

    Unless we crashed just after mknod this bug was harmless as the inode
    is marked dirty at the end of hfsplus_mknod, and hfsplus_write_inode
    will update the catalog entry to contain the correct value.

    Signed-off-by: Christoph Hellwig

    Christoph Hellwig
     
  • HFS implements hardlink by using indirect catalog entries that refer to a hidden
    directly. The link target is cached in the dev field in the HFS+ specific
    inode, which is also used for the device number for device files, and inside
    for passing the nlink value of the indirect node from hfsplus_cat_write_inode
    to a helper function. Now if we happen to write out the indirect node while
    hfsplus_link is creating the catalog entry we'll get a link pointing to the
    linkid of the current nlink value. This can easily be reproduced by a large
    enough loop of local git-clone operations.

    Stop abusing the dev field in the HFS+ inode for short term storage by
    refactoring the way the permission structure in the catalog entry is
    set up, and rename the dev field to linkid to avoid any confusion.

    While we're at it also prevent creating hard links to special files, as
    the HFS+ dev and linkid share the same space in the on-disk structure.

    Signed-off-by: Christoph Hellwig

    Christoph Hellwig
     

01 Oct, 2010

7 commits


17 May, 2010

1 commit


11 Apr, 2008

1 commit

  • Some time ago while attempting to handle invalid link counts, I botched
    the unlink of links itself, so this patch fixes this now correctly, so
    that only the link count of nodes that don't point to links is ignored.
    Thanks to Vlado Plaga to notify me of this
    problem.

    Signed-off-by: Roman Zippel
    Signed-off-by: Linus Torvalds

    Roman Zippel
     

08 Feb, 2008

1 commit

  • Stop the HFSPLUS filesystem from using iget() and read_inode(). Replace
    hfsplus_read_inode() with hfsplus_iget(), and call that instead of iget().
    hfsplus_iget() then uses iget_locked() directly and returns a proper error
    code instead of an inode in the event of an error.

    hfsplus_fill_super() returns any error incurred when getting the root inode.

    Signed-off-by: David Howells
    Cc: Roman Zippel
    Acked-by: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     

17 Jul, 2007

1 commit

  • Add custom dentry hash and comparison operations for HFS+ filesystems that are
    case-insensitive and/or do automatic unicode decomposition. The new
    operations reuse the existing HFS+ ASCII to unicode conversion, unicode
    decomposition and case folding functionality.

    Signed-off-by: Duane Griffin
    Signed-off-by: Roman Zippel

    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Duane Griffin
     

15 Feb, 2007

1 commit

  • After Al Viro (finally) succeeded in removing the sched.h #include in module.h
    recently, it makes sense again to remove other superfluous sched.h includes.
    There are quite a lot of files which include it but don't actually need
    anything defined in there. Presumably these includes were once needed for
    macros that used to live in sched.h, but moved to other header files in the
    course of cleaning it up.

    To ease the pain, this time I did not fiddle with any header files and only
    removed #includes from .c-files, which tend to cause less trouble.

    Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
    arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
    allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
    configs in arch/arm/configs on arm. I also checked that no new warnings were
    introduced by the patch (actually, some warnings are removed that were emitted
    by unnecessarily included header files).

    Signed-off-by: Tim Schmielau
    Acked-by: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tim Schmielau
     

13 Feb, 2007

1 commit

  • Many struct inode_operations in the kernel can be "const". Marking them const
    moves these to the .rodata section, which avoids false sharing with potential
    dirty data. In addition it'll catch accidental writes at compile time to
    these shared resources.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

09 Dec, 2006

1 commit


01 Oct, 2006

3 commits

  • Some filesystems, instead of simply decrementing i_nlink, simply zero it
    during an unlink operation. We need to catch these in addition to the
    decrement operations.

    Signed-off-by: Dave Hansen
    Acked-by: Christoph Hellwig
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Hansen
     
  • This is mostly included for parity with dec_nlink(), where we will have some
    more hooks. This one should stay pretty darn straightforward for now.

    Signed-off-by: Dave Hansen
    Acked-by: Christoph Hellwig
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Hansen
     
  • When a filesystem decrements i_nlink to zero, it means that a write must be
    performed in order to drop the inode from the filesystem.

    We're shortly going to have keep filesystems from being remounted r/o between
    the time that this i_nlink decrement and that write occurs.

    So, add a little helper function to do the decrements. We'll tie into it in a
    bit to note when i_nlink hits zero.

    Signed-off-by: Dave Hansen
    Acked-by: Christoph Hellwig
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Hansen
     

29 Mar, 2006

1 commit

  • This is a conversion to make the various file_operations structs in fs/
    const. Basically a regexp job, with a few manual fixups

    The goal is both to increase correctness (harder to accidentally write to
    shared datastructures) and reducing the false sharing of cachelines with
    things that get dirty in .data (while .rodata is nicely read only and thus
    cache clean)

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

19 Jan, 2006

2 commits

  • HFS+ also requires the correct creation date so recent version of OS X
    recognize it as link.
    Improve link handling:
    - if something is wrong with the link, ignore the link attribute and treat
    it as regular file (this also fixes a missing unlock during lookup).
    - check for incorrect link counts during unlink.

    Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Add the log level and a "hfs: " prefix to all kernel prints. (HFS and HFS+
    will use the same prefix, as they share some code and could be merged at some
    point.)

    Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     

09 Nov, 2005

1 commit

  • This patch removes almost all inclusions of linux/version.h. The 3
    #defines are unused in most of the touched files.

    A few drivers use the simple KERNEL_VERSION(a,b,c) macro, which is
    unfortunatly in linux/version.h.

    There are also lots of #ifdef for long obsolete kernels, this was not
    touched. In a few places, the linux/version.h include was move to where
    the LINUX_VERSION_CODE was used.

    quilt vi `find * -type f -name "*.[ch]"|xargs grep -El '(UTS_RELEASE|LINUX_VERSION_CODE|KERNEL_VERSION|linux/version.h)'|grep -Ev '(/(boot|coda|drm)/|~$)'`

    search pattern:
    /UTS_RELEASE\|LINUX_VERSION_CODE\|KERNEL_VERSION\|linux\/\(utsname\|version\).h

    Signed-off-by: Olaf Hering
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Olaf Hering