1. 14 7月, 2012 1 次提交
  2. 24 3月, 2012 2 次提交
  3. 04 1月, 2012 2 次提交
  4. 19 11月, 2011 1 次提交
    • A
      NLS: improve UTF8 -> UTF16 string conversion routine · 0720a06a
      Alan Stern 提交于
      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: NAlan Stern <stern@rowland.harvard.edu>
      CC: Clemens Ladisch <clemens@ladisch.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0720a06a
  5. 02 11月, 2011 1 次提交
  6. 20 7月, 2011 1 次提交
  7. 28 5月, 2011 1 次提交
  8. 26 5月, 2011 2 次提交
  9. 12 4月, 2011 1 次提交
  10. 10 3月, 2011 1 次提交
  11. 13 1月, 2011 1 次提交
  12. 07 1月, 2011 4 次提交
    • N
      fs: rcu-walk aware d_revalidate method · 34286d66
      Nick Piggin 提交于
      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: NNick Piggin <npiggin@kernel.dk>
      34286d66
    • N
      fs: dcache reduce branches in lookup path · fb045adb
      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: NNick Piggin <npiggin@kernel.dk>
      fb045adb
    • N
      fs: change d_hash for rcu-walk · b1e6a015
      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: NNick Piggin <npiggin@kernel.dk>
      b1e6a015
    • N
      fs: change d_compare for rcu-walk · 621e155a
      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: NNick Piggin <npiggin@kernel.dk>
      621e155a
  13. 29 10月, 2010 1 次提交
  14. 05 10月, 2010 2 次提交
    • A
      BKL: Remove BKL from fat · 3768744c
      Arnd Bergmann 提交于
      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: NArnd Bergmann <arnd@arndb.de>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Jan Blunck <jblunck@infradead.org>
      3768744c
    • J
      BKL: Explicitly add BKL around get_sb/fill_super · db719222
      Jan Blunck 提交于
      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: NJan Blunck <jblunck@infradead.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Matthew Wilcox <matthew@wil.cx>
      Cc: Christoph Hellwig <hch@infradead.org>
      db719222
  15. 01 4月, 2010 1 次提交
  16. 10 2月, 2010 1 次提交
  17. 12 1月, 2010 1 次提交
    • O
      fat: Fix vfat_lookup() · 8045e298
      OGAWA Hirofumi 提交于
      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: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      8045e298
  18. 01 8月, 2009 1 次提交
    • O
      fat/nls: Fix handling of utf8 invalid char · 67638e40
      OGAWA Hirofumi 提交于
      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: NMarton Balint <cus@fazekas.hu>
      Signed-off-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      67638e40
  19. 13 7月, 2009 1 次提交
  20. 16 6月, 2009 1 次提交
    • A
      NLS: update handling of Unicode · 74675a58
      Alan Stern 提交于
      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: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NClemens Ladisch <clemens@ladisch.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      74675a58
  21. 12 6月, 2009 1 次提交
  22. 04 6月, 2009 1 次提交
  23. 28 3月, 2009 1 次提交
  24. 12 11月, 2008 1 次提交
  25. 07 11月, 2008 6 次提交
  26. 26 7月, 2008 1 次提交
    • J
      fatfs: add UTC timestamp option · b271e067
      Joe Peterson 提交于
      Provide a new mount option ("tz=UTC") for DOS (vfat/msdos) filesystems,
      allowing timestamps to be in coordinated universal time (UTC) rather than
      local time in applications where doing this is advantageous.
      
      In particular, portable devices that use fat/vfat (such as digital
      cameras) can benefit from using UTC in their internal clocks, thus
      avoiding daylight saving time errors and general time ambiguity issues.
      The user of the device does not have to worry about changing the time when
      moving from place or when daylight saving changes.
      
      The new mount option, when set, disables the counter-adjustment that Linux
      currently makes to FAT timestamp info in anticipation of the normal
      userspace time zone correction.  When used in this new mode, all daylight
      saving time and time zone handling is done in userspace as is normal for
      many other filesystems (like ext3).  The default mode, which remains
      unchanged, is still appropriate when mounting volumes written in Windows
      (because of its use of local time).
      
      I originally based this patch on one submitted last year by Paul Collins,
      but I updated it to work with current source and changed variable/option
      naming.  Ogawa Hirofumi (who maintains these filesystems) and I discussed
      this patch at length on lkml, and he suggested using the option name in
      the attached version of the patch.  Barry Bouwsma pointed out a good
      addition to the patch as well.
      Signed-off-by: NJoe Peterson <joe@skyrush.com>
      Signed-off-by: NPaul Collins <paul@ondioline.org>
      Acked-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Barry Bouwsma <free_beer_for_all@yahoo.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b271e067
  27. 21 6月, 2008 1 次提交
    • L
      Replace BKL with superblock lock in fat/msdos/vfat · 8f593427
      Linus Torvalds 提交于
      This replaces the use of the BKL in the FAT family of filesystems with the
      existing superblock lock instead.
      
      The code already appears to do mostly proper locking with its own private
      spinlocks (and mutexes), but while the BKL could possibly have been
      dropped entirely, converting it to use the superblock lock (which is just
      a regular mutex) is the conservative thing to do.
      
      As a per-filesystem mutex, it not only won't have any of the possible
      latency issues related to the BKL, but the lock is obviously private to
      the particular filesystem instance and will thus not cause problems for
      entirely unrelated users like the BKL can.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      8f593427
  28. 30 4月, 2008 1 次提交