01 Oct, 2009

1 commit


24 Sep, 2009

1 commit

  • Most call sites of unload_nls() do:
    if (nls)
    unload_nls(nls);

    Check the pointer inside unload_nls() like we do in kfree() and
    simplify the call sites.

    Signed-off-by: Thomas Gleixner
    Cc: Steve French
    Cc: OGAWA Hirofumi
    Cc: Roman Zippel
    Cc: Dave Kleikamp
    Cc: Petr Vandrovec
    Cc: Anton Altaparmakov
    Signed-off-by: Al Viro

    Thomas Gleixner
     

20 Sep, 2009

1 commit

  • If we didn't check sb->s_dirt, it will update the FSINFO
    unconditionally. It will reduce the filetime of flash base device.

    So, this checks sb->s_dirt. sb->s_dirt is racy, however FSINFO is just
    hint. So even if there is race, and we hit it, it would not become big
    problem.

    And this also is as workaround of suspend problem.

    Signed-off-by: OGAWA Hirofumi

    OGAWA Hirofumi
     

14 Sep, 2009

1 commit

  • fat_cont_expand() is the only user of sync_page_range_nolock(). It's also the
    only user of generic_osync_inode() which does not have a file open. So
    opencode needed actions for FAT so that we can convert generic_osync_inode() to
    a standard syncing path.

    Update a comment about generic_osync_inode().

    CC: OGAWA Hirofumi
    Signed-off-by: Jan Kara

    Jan Kara
     

01 Aug, 2009

2 commits

  • Because, with "shortname=lower", copying one FAT filesystem tree to
    another FAT filesystem tree using Linux results in semantically
    different filesystems. (E.g.: Filenames which were once "all
    uppercase" are now "all lowercase").

    So, this changes the default of "shortname=lower" to "shortname=mixed".

    Signed-off-by: Paul Wise
    [change fat_show_options()]
    Signed-off-by: OGAWA Hirofumi

    Paul Wise
     
  • 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
     

11 Jul, 2009

1 commit


20 Jun, 2009

1 commit


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

5 commits

  • Add a ->sync_fs method for data integrity syncs.

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

    Christoph Hellwig
     
  • * 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
     
  • Push down lock_super into ->write_super instances and remove it from the
    caller.

    Following filesystem don't need ->s_lock in ->write_super and are skipped:

    * bfs, nilfs2 - no other uses of s_lock and have internal locks in
    ->write_super
    * ext2 - uses BKL in ext2_write_super and has internal calls without s_lock
    * reiserfs - no other uses of s_lock as has reiserfs_write_lock (BKL) in
    ->write_super
    * xfs - no other uses of s_lock and uses internal lock (buffer lock on
    superblock buffer) to serialize ->write_super. Also xfs_fs_write_super
    is superflous and will go away in the next merge window

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

    Christoph Hellwig
     
  • Move BKL into ->put_super from the only caller. A couple of
    filesystems had trivial enough ->put_super (only kfree and NULLing of
    s_fs_info + stuff in there) to not get any locking: coda, cramfs, efs,
    hugetlbfs, omfs, qnx4, shmem, all others got the full treatment. Most
    of them probably don't need it, but I'd rather sort that out individually.
    Preferably after all the other BKL pushdowns in that area.

    [AV: original used to move lock_super() down as well; these changes are
    removed since we don't do lock_super() at all in generic_shutdown_super()
    now]
    [AV: fuse, btrfs and xfs are known to need no damn BKL, exempt]

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

    Christoph Hellwig
     
  • We just did a full fs writeout using sync_filesystem before, and if
    that's not enough for the filesystem it can perform it's own writeout
    in ->put_super, which many filesystems already do.

    Move a call to foofs_write_super into every foofs_put_super for now to
    guarantee identical behaviour until it's cleaned up by the individual
    filesystem maintainers.

    Exceptions:

    - affs already has identical copy & pasted code at the beginning of
    affs_put_super so no need to do it twice.
    - xfs does the right thing without it and I have changes pending for
    the xfs tree touching this are so I don't really need conflicts
    here..

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

    Christoph Hellwig
     

08 Jun, 2009

1 commit


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
     

18 Apr, 2009

1 commit


03 Apr, 2009

2 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
    Remove two unneeded exports and make two symbols static in fs/mpage.c
    Cleanup after commit 585d3bc06f4ca57f975a5a1f698f65a45ea66225
    Trim includes of fdtable.h
    Don't crap into descriptor table in binfmt_som
    Trim includes in binfmt_elf
    Don't mess with descriptor table in load_elf_binary()
    Get rid of indirect include of fs_struct.h
    New helper - current_umask()
    check_unsafe_exec() doesn't care about signal handlers sharing
    New locking/refcounting for fs_struct
    Take fs_struct handling to new file (fs/fs_struct.c)
    Get rid of bumping fs_struct refcount in pivot_root(2)
    Kill unsharing fs_struct in __set_personality()

    Linus Torvalds
     
  • Make fat return f_fsid info for statfs(2).

    Signed-off-by: Coly Li
    Acked-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Coly Li
     

01 Apr, 2009

1 commit


28 Mar, 2009

1 commit


12 Mar, 2009

1 commit


22 Jan, 2009

1 commit


31 Dec, 2008

1 commit


14 Nov, 2008

2 commits

  • Conflicts:
    security/keys/internal.h
    security/keys/process_keys.c
    security/keys/request_key.c

    Fixed conflicts above by using the non 'tsk' versions.

    Signed-off-by: James Morris

    James Morris
     
  • Wrap access to task credentials so that they can be separated more easily from
    the task_struct during the introduction of COW creds.

    Change most current->(|e|s|fs)[ug]id to current_(|e|s|fs)[ug]id().

    Change some task->e?[ug]id to task_e?[ug]id(). In some places it makes more
    sense to use RCU directly rather than a convenient wrapper; these will be
    addressed by later patches.

    Signed-off-by: David Howells
    Reviewed-by: James Morris
    Acked-by: Serge Hallyn
    Acked-by: OGAWA Hirofumi
    Signed-off-by: James Morris

    David Howells
     

12 Nov, 2008

3 commits


07 Nov, 2008

8 commits

  • blkcnt_t type depends on CONFIG_LSF. Use unsigned long long always for
    printk(). But lazy to type it, so add "llu" and use it.

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

    OGAWA Hirofumi
     
  • i_pos is 64bits value, hence it's not atomic to update.

    Important place is fat_write_inode() only, other places without lock
    are just for printk().

    This adds lock for "BITS_PER_LONG == 32" kernel.

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

    OGAWA Hirofumi
     
  • mmu_private is 64bits value, hence it's not atomic to update.

    So, the access rule for mmu_private is we must hold ->i_mutex. But,
    fat_get_block() path doesn't follow the rule on non-allocation path.

    This fixes by using i_size instead if non-allocation path.

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

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

    OGAWA Hirofumi
     
  • fat_get_cluster() assumes the requested blocknr isn't truncated during
    read. _fat_bmap() doesn't follow this rule.

    This protects it by ->i_mutex.

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

    OGAWA Hirofumi
     
  • FAT has the ATTR_RO (read-only) attribute. But on Windows, the ATTR_RO
    of the directory will be just ignored actually, and is used by only
    applications as flag. E.g. it's setted for the customized folder by
    Explorer.

    http://msdn2.microsoft.com/en-us/library/aa969337.aspx

    This adds "rodir" option. If user specified it, ATTR_RO is used as
    read-only flag even if it's the directory. Otherwise, inode->i_mode
    is not used to hold ATTR_RO (i.e. fat_mode_can_save_ro() returns 0).

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

    OGAWA Hirofumi
     
  • If inode->i_mode doesn't have S_WUGO, current code assumes it means
    ATTR_RO. However, if (~[ufd]mask & S_WUGO) == 0, inode->i_mode can't
    hold S_WUGO. Therefore the updated directory entry will always have
    ATTR_RO.

    This adds fat_mode_can_hold_ro() to check it. And if inode->i_mode
    can't hold, uses -i_attrs to hold ATTR_RO instead.

    With this, we don't set ATTR_RO unless users change it via ioctl() if
    (~[ufd]mask & S_WUGO) == 0.

    And on FAT_IOCTL_GET_ATTRIBUTES path, this adds ->i_mutex to it for
    not returning the partially updated attributes by FAT_IOCTL_SET_ATTRIBUTES
    to userland.

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

    OGAWA Hirofumi
     
  • This adds three helpers:

    fat_make_attrs() - makes FAT attributes from inode.
    fat_make_mode() - makes mode_t from FAT attributes.
    fat_save_attrs() - saves FAT attributes to inode.

    Then this replaces: MSDOS_MKMODE() by fat_make_mode(), fat_attr() by
    fat_make_attrs(), ->i_attrs = attr & ATTR_UNUSED by fat_save_attrs().
    And for root inode, those is used with ATTR_DIR instead of bogus
    ATTR_NONE.

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

    OGAWA Hirofumi