1. 18 11月, 2010 1 次提交
  2. 29 10月, 2010 1 次提交
  3. 05 10月, 2010 2 次提交
    • P
      ncpfs: Lock socket in ncpfs while setting its callbacks · 2a4df5d3
      Petr Vandrovec 提交于
      Otherwise partially updated pointers could be seen if
      pointer update is not atomic.
      Signed-off-by: NPetr Vandrovec <petr@vandrovec.name>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      2a4df5d3
    • P
      BKL: Remove BKL from ncpfs · 2e54eb96
      Petr Vandrovec 提交于
      Dozen of changes in ncpfs to provide some locking other than BKL.
      
      In readdir cache unlock and mark complete first page as last operation,
      so it can be used for synchronization, as code intended.
      
      When updating dentry name on case insensitive filesystems do at least
      some basic locking...
      
      Hold i_mutex when updating inode fields.
      
      Push some ncp_conn_is_valid down to ncp_request.  Connection can become
      invalid at any moment, and fewer error code paths to test the better.
      
      Use i_size_{read,write} to modify file size.
      
      Set inode's backing_dev_info as ncpfs has its own special bdi.
      
      In ioctl unbreak ioctls invoked on filesystem mounted 'ro' - tests are
      for inode writeable or owner match, but were turned to filesystem
      writeable and inode writeable or owner match.  Also collect all permission
      checks in single place.
      
      Add some locking, and remove comments saying that it would be cool to
      add some locks to the code.
      
      Constify some pointers.
      Signed-off-by: NPetr Vandrovec <petr@vandrovec.name>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      2e54eb96
  4. 10 8月, 2010 2 次提交
    • A
      switch ncpfs to ->evict_inode() · 94ee8494
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      94ee8494
    • C
      remove inode_setattr · 1025774c
      Christoph Hellwig 提交于
      Replace inode_setattr with opencoded variants of it in all callers.  This
      moves the remaining call to vmtruncate into the filesystem methods where it
      can be replaced with the proper truncate sequence.
      
      In a few cases it was obvious that we would never end up calling vmtruncate
      so it was left out in the opencoded variant:
      
       spufs: explicitly checks for ATTR_SIZE earlier
       btrfs,hugetlbfs,logfs,dlmfs: explicitly clears ATTR_SIZE earlier
       ufs: contains an opencoded simple_seattr + truncate that sets the filesize just above
      
      In addition to that ncpfs called inode_setattr with handcrafted iattrs,
      which allowed to trim down the opencoded variant.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      1025774c
  5. 06 7月, 2010 1 次提交
  6. 28 6月, 2010 1 次提交
  7. 28 5月, 2010 2 次提交
  8. 17 5月, 2010 1 次提交
  9. 22 4月, 2010 1 次提交
  10. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  11. 04 12月, 2009 1 次提交
  12. 28 9月, 2009 1 次提交
  13. 24 9月, 2009 1 次提交
    • T
      fs: Make unload_nls() NULL pointer safe · 6d729e44
      Thomas Gleixner 提交于
      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: NThomas Gleixner <tglx@linutronix.de>
      Cc: Steve French <sfrench@us.ibm.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
      Cc: Petr Vandrovec <vandrove@vc.cvut.cz>
      Cc: Anton Altaparmakov <aia21@cantab.net>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      6d729e44
  14. 23 9月, 2009 2 次提交
  15. 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
  16. 12 6月, 2009 1 次提交
    • C
      push BKL down into ->put_super · 6cfd0148
      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: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      6cfd0148
  17. 21 4月, 2009 1 次提交
  18. 28 3月, 2009 1 次提交
  19. 22 1月, 2009 1 次提交
  20. 07 1月, 2009 1 次提交
  21. 06 1月, 2009 1 次提交
  22. 14 11月, 2008 1 次提交
  23. 27 7月, 2008 2 次提交
  24. 03 7月, 2008 1 次提交
    • A
      Remove BKL from remote_llseek v2 · 9465efc9
      Andi Kleen 提交于
      - Replace remote_llseek with generic_file_llseek_unlocked (to force compilation
      failures in all users)
      - Change all users to either use generic_file_llseek_unlocked directly or
      take the BKL around. I changed the file systems who don't use the BKL
      for anything (CIFS, GFS) to call it directly. NCPFS and SMBFS and NFS
      take the BKL, but explicitely in their own source now.
      
      I moved them all over in a single patch to avoid unbisectable sections.
      
      Open problem: 32bit kernels can corrupt fpos because its modification
      is not atomic, but they can do that anyways because there's other paths who
      modify it without BKL.
      
      Do we need a special lock for the pos/f_version = 0 checks?
      
      Trond says the NFS BKL is likely not needed, but keep it for now
      until his full audit.
      
      v2: Use generic_file_llseek_unlocked instead of remote_llseek_unlocked
          and factor duplicated code (suggested by hch)
      
      Cc: Trond.Myklebust@netapp.com
      Cc: swhiteho@redhat.com
      Cc: sfrench@samba.org
      Cc: vandrove@vc.cvut.cz
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      9465efc9
  25. 29 4月, 2008 1 次提交
  26. 28 4月, 2008 3 次提交
  27. 19 4月, 2008 1 次提交
  28. 09 2月, 2008 1 次提交
  29. 07 2月, 2008 1 次提交
  30. 04 2月, 2008 1 次提交
  31. 17 10月, 2007 1 次提交
  32. 01 8月, 2007 1 次提交
  33. 20 7月, 2007 1 次提交
    • P
      mm: Remove slab destructors from kmem_cache_create(). · 20c2df83
      Paul Mundt 提交于
      Slab destructors were no longer supported after Christoph's
      c59def9f change. They've been
      BUGs for both slab and slub, and slob never supported them
      either.
      
      This rips out support for the dtor pointer from kmem_cache_create()
      completely and fixes up every single callsite in the kernel (there were
      about 224, not including the slab allocator definitions themselves,
      or the documentation references).
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      20c2df83