10 Jan, 2012

1 commit

  • * 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (232 commits)
    USB: Add USB-ID for Multiplex RC serial adapter to cp210x.c
    xhci: Clean up 32-bit build warnings.
    USB: update documentation for usbmon
    usb: usb-storage doesn't support dynamic id currently, the patch disables the feature to fix an oops
    drivers/usb/class/cdc-acm.c: clear dangling pointer
    drivers/usb/dwc3/dwc3-pci.c: introduce missing kfree
    drivers/usb/host/isp1760-if.c: introduce missing kfree
    usb: option: add ZD Incorporated HSPA modem
    usb: ch9: fix up MaxStreams helper
    USB: usb-skeleton.c: cleanup open_count
    USB: usb-skeleton.c: fix open/disconnect race
    xhci: Properly handle COMP_2ND_BW_ERR
    USB: remove dead code from suspend/resume path
    USB: add quirk for another camera
    drivers: usb: wusbcore: Fix dependency for USB_WUSB
    xhci: Better debugging for critical host errors.
    xhci: Be less verbose during URB cancellation.
    xhci: Remove debugging about ring structure allocation.
    xhci: Remove debugging about toggling cycle bits.
    xhci: Remove debugging for individual transfers.
    ...

    Linus Torvalds
     

04 Jan, 2012

2 commits


19 Nov, 2011

1 commit

  • The utf8s_to_utf16s conversion routine needs to be improved. Unlike
    its utf16s_to_utf8s sibling, it doesn't accept arguments specifying
    the maximum length of the output buffer or the endianness of its
    16-bit output.

    This patch (as1501) adds the two missing arguments, and adjusts the
    only two places in the kernel where the function is called. A
    follow-on patch will add a third caller that does utilize the new
    capabilities.

    The two conversion routines are still annoyingly inconsistent in the
    way they handle invalid byte combinations. But that's a subject for a
    different patch.

    Signed-off-by: Alan Stern
    CC: Clemens Ladisch
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     

02 Nov, 2011

1 commit


20 Jul, 2011

1 commit


28 May, 2011

1 commit


27 May, 2011

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (25 commits)
    cifs: remove unnecessary dentry_unhash on rmdir/rename_dir
    ocfs2: remove unnecessary dentry_unhash on rmdir/rename_dir
    exofs: remove unnecessary dentry_unhash on rmdir/rename_dir
    nfs: remove unnecessary dentry_unhash on rmdir/rename_dir
    ext2: remove unnecessary dentry_unhash on rmdir/rename_dir
    ext3: remove unnecessary dentry_unhash on rmdir/rename_dir
    ext4: remove unnecessary dentry_unhash on rmdir/rename_dir
    btrfs: remove unnecessary dentry_unhash in rmdir/rename_dir
    ceph: remove unnecessary dentry_unhash calls
    vfs: clean up vfs_rename_other
    vfs: clean up vfs_rename_dir
    vfs: clean up vfs_rmdir
    vfs: fix vfs_rename_dir for FS_RENAME_DOES_D_MOVE filesystems
    libfs: drop unneeded dentry_unhash
    vfs: update dentry_unhash() comment
    vfs: push dentry_unhash on rename_dir into file systems
    vfs: push dentry_unhash on rmdir into file systems
    vfs: remove dget() from dentry_unhash()
    vfs: dentry_unhash immediately prior to rmdir
    vfs: Block mmapped writes while the fs is frozen
    ...

    Linus Torvalds
     

26 May, 2011

2 commits


12 Apr, 2011

1 commit


10 Mar, 2011

1 commit


13 Jan, 2011

1 commit


07 Jan, 2011

4 commits

  • Require filesystems be aware of .d_revalidate being called in rcu-walk
    mode (nd->flags & LOOKUP_RCU). For now do a simple push down, returning
    -ECHILD from all implementations.

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • 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
     
  • Change d_hash so it may be called from lock-free RCU lookups. See similar
    patch for d_compare for details.

    For in-tree filesystems, this is just a mechanical change.

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • Change d_compare so it may be called from lock-free RCU lookups. This
    does put significant restrictions on what may be done from the callback,
    however there don't seem to have been any problems with in-tree fses.
    If some strange use case pops up that _really_ cannot cope with the
    rcu-walk rules, we can just add new rcu-unaware callbacks, which would
    cause name lookup to drop out of rcu-walk mode.

    For in-tree filesystems, this is just a mechanical change.

    Signed-off-by: Nick Piggin

    Nick Piggin
     

29 Oct, 2010

1 commit


05 Oct, 2010

2 commits

  • The lock_kernel in fat_put_super is not needed because
    it only protects the super block itself and we know that
    no other thread can reach it because we are about to
    kfree the object.

    In the two fill_super functions, this converts the locking
    to use lock_super like elsewhere in the fat code. This
    is probably not needed either, but is consistent and puts
    us on the safe side.

    Signed-off-by: Arnd Bergmann
    Cc: OGAWA Hirofumi
    Cc: Jan Blunck

    Arnd Bergmann
     
  • This patch is a preparation necessary to remove the BKL from do_new_mount().
    It explicitly adds calls to lock_kernel()/unlock_kernel() around
    get_sb/fill_super operations for filesystems that still uses the BKL.

    I've read through all the code formerly covered by the BKL inside
    do_kern_mount() and have satisfied myself that it doesn't need the BKL
    any more.

    do_kern_mount() is already called without the BKL when mounting the rootfs
    and in nfsctl. do_kern_mount() calls vfs_kern_mount(), which is called
    from various places without BKL: simple_pin_fs(), nfs_do_clone_mount()
    through nfs_follow_mountpoint(), afs_mntpt_do_automount() through
    afs_mntpt_follow_link(). Both later functions are actually the filesystems
    follow_link inode operation. vfs_kern_mount() is calling the specified
    get_sb function and lets the filesystem do its job by calling the given
    fill_super function.

    Therefore I think it is safe to push down the BKL from the VFS to the
    low-level filesystems get_sb/fill_super operation.

    [arnd: do not add the BKL to those file systems that already
    don't use it elsewhere]

    Signed-off-by: Jan Blunck
    Signed-off-by: Arnd Bergmann
    Cc: Matthew Wilcox
    Cc: Christoph Hellwig

    Jan Blunck
     

01 Apr, 2010

1 commit

  • When using the string representation of a random counter as part of the base
    name, ensure that it is no longer than 4 bytes.

    Since we are repeatedly decrementing the counter in a loop until we have found a
    unique base name, the counter may wrap around zero; therefore, it is not enough
    to mask its higher bits before entering the loop, this must be done inside the
    loop.

    [hirofumi@mail.parknet.co.jp: use snprintf()]
    Signed-off-by: Nikolaus Schulz
    Cc: stable@kernel.org
    Signed-off-by: OGAWA Hirofumi
    Signed-off-by: Linus Torvalds

    Nikolaus Schulz
     

10 Feb, 2010

1 commit

  • I found that the length of a file name when created cannot exceed 255
    characters, yet, pathconf(), via statfs(), returns the maximum as 260.

    Signed-off-by: Kevin Dankwardt
    Signed-off-by: OGAWA Hirofumi

    Kevin Dankwardt
     

12 Jan, 2010

1 commit

  • After d_find_alias(), vfat_lookup() checks !(->d_flags & DCACHE_DISCONNECTED)
    without IS_ROOT(). This means it hits non-anonymous but disconnected
    dentry. (NOTE: d_splice_alias() doesn't clear DCACHE_DISCONNECTED)

    But, vfat_lookup() has interest to alias if it was non-anonymous. So,
    this adds vfat_d_anon_disconn() helper to check it correctly.

    Another bug is refcnt leak. It needs dput() for uninterested alias.

    Signed-off-by: OGAWA Hirofumi

    OGAWA Hirofumi
     

01 Aug, 2009

1 commit

  • With utf8 option, vfat allowed the duplicated filenames.

    Normal nls returns -EINVAL for invalid char. But utf8s_to_utf16s()
    skipped the invalid char historically.

    So, this changes the utf8s_to_utf16s() directly to return -EINVAL for
    invalid char, because vfat is only user of it.

    mkdir /mnt/fatfs
    FILENAME=`echo -ne "invalidutf8char_\\0341_endofchar"`
    echo "Using filename: $FILENAME"
    dd if=/dev/zero of=fatfs bs=512 count=128
    mkdosfs -F 32 fatfs
    mount -o loop,utf8 fatfs /mnt/fatfs
    touch "/mnt/fatfs/$FILENAME"
    umount /mnt/fatfs
    mount -o loop,utf8 fatfs /mnt/fatfs
    touch "/mnt/fatfs/$FILENAME"
    ls -l /mnt/fatfs
    umount /mnt/fatfs

    ---- And the output is:

    Using filename: invalidutf8char_\0341_endofchar
    128+0 records in
    128+0 records out
    65536 bytes (66 kB) copied, 0.000388118 s, 169 MB/s
    mkdosfs 2.11 (12 Mar 2005)
    total 0
    -rwxr-xr-x 1 root root 0 Jun 28 19:46 invalidutf8char__endofchar
    -rwxr-xr-x 1 root root 0 Jun 28 19:46 invalidutf8char__endofchar

    Tested-by: Marton Balint
    Signed-off-by: OGAWA Hirofumi

    OGAWA Hirofumi
     

13 Jul, 2009

1 commit

  • * Remove smp_lock.h from files which don't need it (including some headers!)
    * Add smp_lock.h to files which do need it
    * Make smp_lock.h include conditional in hardirq.h
    It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPT

    This will make hardirq.h inclusion cheaper for every PREEMPT=n config
    (which includes allmodconfig/allyesconfig, BTW)

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

17 Jun, 2009

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (143 commits)
    USB: xhci depends on PCI.
    USB: xhci: Add Makefile, MAINTAINERS, and Kconfig entries.
    USB: xhci: Respect critical sections.
    USB: xHCI: Fix interrupt moderation.
    USB: xhci: Remove packed attribute from structures.
    usb; xhci: Fix TRB offset calculations.
    USB: xhci: replace if-elseif-else with switch-case
    USB: xhci: Make xhci-mem.c include linux/dmapool.h
    USB: xhci: drop spinlock in xhci_urb_enqueue() error path.
    USB: Change names of SuperSpeed ep companion descriptor structs.
    USB: xhci: Avoid compiler reordering in Link TRB giveback.
    USB: xhci: Clean up xhci_irq() function.
    USB: xhci: Avoid global namespace pollution.
    USB: xhci: Fix Link TRB handoff bit twiddling.
    USB: xhci: Fix register write order.
    USB: xhci: fix some compiler warnings in xhci.h
    USB: xhci: fix lots of compiler warnings.
    USB: xhci: use xhci_handle_event instead of handle_event
    USB: xhci: URB cancellation support.
    USB: xhci: Scatter gather list support for bulk transfers.
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/hirofumi/fatfs-2.6:
    fat: split fat_generic_ioctl
    FAT: add 'errors' mount option

    Linus Torvalds
     

16 Jun, 2009

1 commit

  • This patch (as1239) updates the kernel's treatment of Unicode. The
    character-set conversion routines are well behind the current state of
    the Unicode specification: They don't recognize the existence of code
    points beyond plane 0 or of surrogate pairs in the UTF-16 encoding.

    The old wchar_t 16-bit type is retained because it's still used in
    lots of places. This shouldn't cause any new problems; if a
    conversion now results in an invalid 16-bit code then before it must
    have yielded an undefined code.

    Difficult-to-read names like "utf_mbstowcs" are replaced with more
    transparent names like "utf8s_to_utf16s" and the ordering of the
    parameters is rationalized (buffer lengths come immediate after the
    pointers they refer to, and the inputs precede the outputs).
    Fortunately the low-level conversion routines are used in only a few
    places; the interfaces to the higher-level uni2char and char2uni
    methods have been left unchanged.

    Signed-off-by: Alan Stern
    Acked-by: Clemens Ladisch
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     

12 Jun, 2009

1 commit

  • * mark directory data blocks as assoc. metadata
    * add new inode to deal with FAT, mark FAT blocks as assoc. metadata of that
    * now ->fsync() is trivial both for files and directories

    Signed-off-by: Al Viro

    Al Viro
     

04 Jun, 2009

1 commit

  • On severe errors FAT remounts itself in read-only mode. Allow to
    specify FAT fs desired behavior through 'errors' mount option:
    panic, continue or remount read-only.

    `mount -t [fat|vfat] -o errors=[panic,remount-ro,continue] \
    `

    This is analog to ext2 fs 'errors' mount option.

    Signed-off-by: Denis Karpov
    Signed-off-by: OGAWA Hirofumi

    Denis Karpov
     

28 Mar, 2009

1 commit


12 Nov, 2008

1 commit


07 Nov, 2008

6 commits

  • d_invalidate() for positive dentry doesn't work in some cases
    (vfsmount, nfsd, and maybe others). shrink_dcache_parent() by
    d_invalidate() is pointless for vfat usage at all.

    So, this kills it, and intead of it uses d_move().

    To save old behavior, this returns alias simply for directory (don't
    change pwd, etc..). the directory lookup shouldn't be important for
    performance.

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

    OGAWA Hirofumi
     
  • - Add comments for handling dcache of vfat.

    - Separate case-sensitive case and case-insensitive to
    vfat_revalidate() and vfat_ci_revalidate().

    vfat_revalidate() doesn't need to drop case-insensitive negative
    dentry on creation path.

    - Current code is missing to set ->d_revalidate to the negative dentry
    created by unlink/etc..

    This sets ->d_revalidate always, and returns 1 for positive
    dentry. Now, we don't need to change ->d_op dynamically anymore,
    so this just uses sb->s_root->d_op to set ->d_op.

    - d_find_alias() may return DCACHE_DISCONNECTED dentry. It's not
    the interesting dentry there. This checks it.

    - Add missing LOOKUP_PARENT check. We don't need to drop the valid
    negative dentry for (LOOKUP_CREATE | LOOKUP_PARENT) lookup.

    - For consistent filename on creation path, this drops negative dentry
    if we can't see intent.

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

    OGAWA Hirofumi
     
  • Current vfat_lookup() creates negetive dentry blindly if vfat_find()
    returned a error. It's wrong. If the error isn't -ENOENT, just return
    error.

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

    OGAWA Hirofumi
     
  • This cleans date_dos2unix()/fat_date_unix2dos() up. New code should be
    much more readable.

    And this fixes those old functions. Those doesn't handle 2100
    correctly. 2100 isn't leap year, but old one handles it as leap year.
    Also, with this, centi sec is handled and is fixed.

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

    OGAWA Hirofumi
     
  • This splits __KERNEL__ stuff in include/msdos_fs.h into fs/fat/fat.h.

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

    OGAWA Hirofumi
     
  • This just moves those files, but change link order from MSDOS, VFAT to
    VFAT, MSDOS.

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

    OGAWA Hirofumi