1. 17 10月, 2007 6 次提交
  2. 12 9月, 2007 1 次提交
  3. 27 7月, 2007 1 次提交
  4. 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
  5. 18 7月, 2007 2 次提交
  6. 17 7月, 2007 1 次提交
  7. 10 7月, 2007 1 次提交
  8. 24 5月, 2007 1 次提交
  9. 17 5月, 2007 1 次提交
    • C
      Remove SLAB_CTOR_CONSTRUCTOR · a35afb83
      Christoph Lameter 提交于
      SLAB_CTOR_CONSTRUCTOR is always specified. No point in checking it.
      Signed-off-by: NChristoph Lameter <clameter@sgi.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: Michael Halcrow <mhalcrow@us.ibm.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Miklos Szeredi <miklos@szeredi.hu>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Dave Kleikamp <shaggy@austin.ibm.com>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: Anton Altaparmakov <aia21@cantab.net>
      Cc: Mark Fasheh <mark.fasheh@oracle.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Jan Kara <jack@ucw.cz>
      Cc: David Chinner <dgc@sgi.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a35afb83
  10. 10 5月, 2007 1 次提交
  11. 09 5月, 2007 6 次提交
  12. 08 5月, 2007 2 次提交
    • C
      slab allocators: Remove SLAB_DEBUG_INITIAL flag · 50953fe9
      Christoph Lameter 提交于
      I have never seen a use of SLAB_DEBUG_INITIAL.  It is only supported by
      SLAB.
      
      I think its purpose was to have a callback after an object has been freed
      to verify that the state is the constructor state again?  The callback is
      performed before each freeing of an object.
      
      I would think that it is much easier to check the object state manually
      before the free.  That also places the check near the code object
      manipulation of the object.
      
      Also the SLAB_DEBUG_INITIAL callback is only performed if the kernel was
      compiled with SLAB debugging on.  If there would be code in a constructor
      handling SLAB_DEBUG_INITIAL then it would have to be conditional on
      SLAB_DEBUG otherwise it would just be dead code.  But there is no such code
      in the kernel.  I think SLUB_DEBUG_INITIAL is too problematic to make real
      use of, difficult to understand and there are easier ways to accomplish the
      same effect (i.e.  add debug code before kfree).
      
      There is a related flag SLAB_CTOR_VERIFY that is frequently checked to be
      clear in fs inode caches.  Remove the pointless checks (they would even be
      pointless without removeal of SLAB_DEBUG_INITIAL) from the fs constructors.
      
      This is the last slab flag that SLUB did not support.  Remove the check for
      unimplemented flags from SLUB.
      Signed-off-by: NChristoph Lameter <clameter@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      50953fe9
    • N
      mm: make read_cache_page synchronous · 6fe6900e
      Nick Piggin 提交于
      Ensure pages are uptodate after returning from read_cache_page, which allows
      us to cut out most of the filesystem-internal PageUptodate calls.
      
      I didn't have a great look down the call chains, but this appears to fixes 7
      possible use-before uptodate in hfs, 2 in hfsplus, 1 in jfs, a few in
      ecryptfs, 1 in jffs2, and a possible cleared data overwritten with readpage in
      block2mtd.  All depending on whether the filler is async and/or can return
      with a !uptodate page.
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Cc: Hugh Dickins <hugh@veritas.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6fe6900e
  13. 01 5月, 2007 1 次提交
  14. 24 4月, 2007 1 次提交
    • J
      reiserfs: fix xattr root locking/refcount bug · 9b7f3755
      Jeff Mahoney 提交于
      The listxattr() and getxattr() operations are only protected by a read
      lock.  As a result, if either of these operations run in parallel, a race
      condition exists where the xattr_root will end up being cached twice, which
      results in the leaking of a reference and a BUG() on umount.
      
      This patch refactors get_xa_root(), __get_xa_root(), and create_xa_root(),
      into one get_xa_root() function that takes the appropriate locking around
      the entire critical section.
      
      Reported, diagnosed and tested by Andrea Righi <a.righi@cineca.it>
      Signed-off-by: NJeff Mahoney <jeffm@suse.com>
      Cc: Andrea Righi <a.righi@cineca.it>
      Cc: "Vladimir V. Saveliev" <vs@namesys.com>
      Cc: Edward Shishkin <edward@namesys.com>
      Cc: Alex Zarochentsev <zam@namesys.com>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9b7f3755
  15. 13 4月, 2007 1 次提交
  16. 13 2月, 2007 3 次提交
  17. 23 1月, 2007 1 次提交
    • V
      [PATCH] resierfs: avoid tail packing if an inode was ever mmapped · de14569f
      Vladimir Saveliev 提交于
      This patch fixes a confusion reiserfs has for a long time.
      
      On release file operation reiserfs used to try to pack file data stored in
      last incomplete page of some files into metadata blocks.  After packing the
      page got cleared with clear_page_dirty.  It did not take into account that
      the page may be mmaped into other process's address space.  Recent
      replacement for clear_page_dirty cancel_dirty_page found the confusion with
      sanity check that page has to be not mapped.
      
      The patch fixes the confusion by making reiserfs avoid tail packing if an
      inode was ever mmapped.  reiserfs_mmap and reiserfs_file_release are
      serialized with mutex in reiserfs specific inode.  reiserfs_mmap locks the
      mutex and sets a bit in reiserfs specific inode flags.
      reiserfs_file_release checks the bit having the mutex locked.  If bit is
      set - tail packing is avoided.  This eliminates a possibility that mmapped
      page gets cancel_page_dirty-ed.
      Signed-off-by: NVladimir Saveliev <vs@namesys.com>
      Cc: Jeff Mahoney <jeffm@suse.com>
      Cc: Chris Mason <mason@suse.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      de14569f
  18. 24 12月, 2006 1 次提交
  19. 14 12月, 2006 1 次提交
    • R
      [PATCH] getting rid of all casts of k[cmz]alloc() calls · 5cbded58
      Robert P. J. Day 提交于
      Run this:
      
      	#!/bin/sh
      	for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do
      	  echo "De-casting $f..."
      	  perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f
      	done
      
      And then go through and reinstate those cases where code is casting pointers
      to non-pointers.
      
      And then drop a few hunks which conflicted with outstanding work.
      
      Cc: Russell King <rmk@arm.linux.org.uk>, Ian Molton <spyro@f2s.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Greg KH <greg@kroah.com>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Paul Fulghum <paulkf@microgate.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Karsten Keil <kkeil@suse.de>
      Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
      Cc: Jeff Garzik <jeff@garzik.org>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Cc: Ian Kent <raven@themaw.net>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Neil Brown <neilb@cse.unsw.edu.au>
      Cc: Jaroslav Kysela <perex@suse.cz>
      Cc: Takashi Iwai <tiwai@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5cbded58
  20. 09 12月, 2006 3 次提交
  21. 08 12月, 2006 4 次提交
    • V
      [PATCH] reiserfs: do not add save links for O_DIRECT writes · c5574768
      Vladimir V. Saveliev 提交于
      We add a save link for O_DIRECT writes to protect the i_size against the
      crashes before we actually finish the I/O.  If we hit an -ENOSPC in
      aops->prepare_write(), we would do a truncate() to release the blocks which
      might have got initialized.  Now the truncate would add another save link
      for the same inode causing a reiserfs panic for having multiple save links
      for the same inode.
      Signed-off-by: NVladimir V. Saveliev <vs@namesys.com>
      Signed-off-by: NAmit Arora <amitarora@in.ibm.com>
      Signed-off-by: NSuzuki K P <suzuki@in.ibm.com>
      Cc: Jeff Mahoney <jeffm@suse.com>
      Cc: Chris Mason <mason@suse.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      c5574768
    • Y
      [PATCH] reiser: replace kmalloc+memset with kzalloc · 01afb213
      Yan Burman 提交于
      Replace kmalloc+memset with kzalloc
      Signed-off-by: NYan Burman <burman.yan@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      01afb213
    • A
      [PATCH] reiserfs: add missing D-cache flushing · de21c57b
      Alexey Dobriyan 提交于
      Looks like, reiserfs_prepare_file_region_for_write() doesn't contain
      several flush_dcache_page() calls.
      
      Found with help from Dmitriy Monakhov <dmonakhov@openvz.org>
      
      [akpm@osdl.org: small speedup]
      Signed-off-by: NAlexey Dobriyan <adobriyan@openvz.org>
      Cc: Dmitriy Monakhov <dmonakhov@openvz.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      de21c57b
    • S
      [PATCH] fix reiserfs bad path release panic · 87b4126f
      Suzuki K P 提交于
      One of our test team hit a reiserfs_panic while running fsstress tests on
      2.6.19-rc1.  The message looks like :
      
        REISERFS: panic(device Null superblock):
        reiserfs[5676]: assertion !(p->path_length != 1 ) failed at
        fs/reiserfs/stree.c:397:reiserfs_check_path: path not properly relsed.
      
      The backtrace looked :
      
        kernel BUG in reiserfs_panic at fs/reiserfs/prints.c:361!
      	.reiserfs_check_path+0x58/0x74
      	.reiserfs_get_block+0x1444/0x1508
      	.__block_prepare_write+0x1c8/0x558
      	.block_prepare_write+0x34/0x64
      	.reiserfs_prepare_write+0x118/0x1d0
      	.generic_file_buffered_write+0x314/0x82c
      	.__generic_file_aio_write_nolock+0x350/0x3e0
      	.__generic_file_write_nolock+0x78/0xb0
      	.generic_file_write+0x60/0xf0
      	.reiserfs_file_write+0x198/0x2038
      	.vfs_write+0xd0/0x1b4
      	.sys_write+0x4c/0x8c
      	syscall_exit+0x0/0x4
      
      Upon debugging I found that the restart_transaction was not releasing
      the path if the th->refcount was > 1.
      
      /*static*/
      int restart_transaction(struct reiserfs_transaction_handle *th,
                                 			struct inode *inode, struct path *path)
      {
      	[...]
      
               /* we cannot restart while nested */
               if (th->t_refcount > 1) { <<- Path is not released in this case!
                       return 0;
               }
      
               pathrelse(path); <<- Path released here.
      	[...]
      
      This could happen in such a situation :
      
      In reiserfs/inode.c: reiserfs_get_block() ::
      
            if (repeat == NO_DISK_SPACE || repeat == QUOTA_EXCEEDED) {
                /* restart the transaction to give the journal a chance to free
                 ** some blocks.  releases the path, so we have to go back to
                 ** research if we succeed on the second try
                 */
                SB_JOURNAL(inode->i_sb)->j_next_async_flush = 1;
      
              -->>  retval = restart_transaction(th, inode, &path); <<--
      
        We are supposed to release the path, no matter we succeed or fail. But
      if the th->refcount is > 1, the path is still valid. And,
      
                if (retval)
                         goto failure;
                repeat =
                    _allocate_block(th, block, inode,
                                   &allocated_block_nr, NULL, create);
      
      If the above allocate_block fails with NO_DISK_SPACE or QUOTA_EXCEEDED,
      we would have path which is not released.
      
               if (repeat != NO_DISK_SPACE && repeat != QUOTA_EXCEEDED) {
                         goto research;
               }
               if (repeat == QUOTA_EXCEEDED)
                         retval = -EDQUOT;
               else
                         retval = -ENOSPC;
               goto failure;
      	[...]
      
             failure:
      	[...]
               reiserfs_check_path(&path); << Panics here !
      
      Attached here is a patch which could fix the issue.
      
      fix reiserfs/inode.c : restart_transaction() to release the path in all
      cases.
      
      The restart_transaction() doesn't release the path when the the journal
      handle has a refcount > 1.  This would trigger a reiserfs_panic() if we
      encounter an -ENOSPC / -EDQUOT in reiserfs_get_block().
      Signed-off-by: NSuzuki K P <suzuki@in.ibm.com>
      Cc: "Vladimir V. Saveliev" <vs@namesys.com>
      Cc: <reiserfs-dev@namesys.com>
      Cc: Jeff Mahoney <jeffm@suse.com>
      Acked-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      87b4126f