1. 24 12月, 2006 1 次提交
  2. 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
  3. 09 12月, 2006 3 次提交
  4. 08 12月, 2006 6 次提交
    • 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
    • C
      [PATCH] slab: remove kmem_cache_t · e18b890b
      Christoph Lameter 提交于
      Replace all uses of kmem_cache_t with struct kmem_cache.
      
      The patch was generated using the following script:
      
      	#!/bin/sh
      	#
      	# Replace one string by another in all the kernel sources.
      	#
      
      	set -e
      
      	for file in `find * -name "*.c" -o -name "*.h"|xargs grep -l $1`; do
      		quilt add $file
      		sed -e "1,\$s/$1/$2/g" $file >/tmp/$$
      		mv /tmp/$$ $file
      		quilt refresh
      	done
      
      The script was run like this
      
      	sh replace kmem_cache_t "struct kmem_cache"
      Signed-off-by: NChristoph Lameter <clameter@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e18b890b
    • C
      [PATCH] slab: remove SLAB_KERNEL · e94b1766
      Christoph Lameter 提交于
      SLAB_KERNEL is an alias of GFP_KERNEL.
      Signed-off-by: NChristoph Lameter <clameter@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e94b1766
  5. 03 12月, 2006 1 次提交
  6. 30 11月, 2006 1 次提交
  7. 26 11月, 2006 1 次提交
  8. 22 11月, 2006 1 次提交
  9. 04 11月, 2006 1 次提交
  10. 21 10月, 2006 1 次提交
    • A
      [PATCH] separate bdi congestion functions from queue congestion functions · 3fcfab16
      Andrew Morton 提交于
      Separate out the concept of "queue congestion" from "backing-dev congestion".
      Congestion is a backing-dev concept, not a queue concept.
      
      The blk_* congestion functions are retained, as wrappers around the core
      backing-dev congestion functions.
      
      This proper layering is needed so that NFS can cleanly use the congestion
      functions, and so that CONFIG_BLOCK=n actually links.
      
      Cc: "Thomas Maier" <balagi@justmail.de>
      Cc: "Jens Axboe" <jens.axboe@oracle.com>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Peter Osterlund <petero2@telia.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3fcfab16
  11. 12 10月, 2006 1 次提交
  12. 08 10月, 2006 1 次提交
  13. 04 10月, 2006 3 次提交
  14. 03 10月, 2006 1 次提交
    • D
      [PATCH] VFS: Make filldir_t and struct kstat deal in 64-bit inode numbers · afefdbb2
      David Howells 提交于
      These patches make the kernel pass 64-bit inode numbers internally when
      communicating to userspace, even on a 32-bit system.  They are required
      because some filesystems have intrinsic 64-bit inode numbers: NFS3+ and XFS
      for example.  The 64-bit inode numbers are then propagated to userspace
      automatically where the arch supports it.
      
      Problems have been seen with userspace (eg: ld.so) using the 64-bit inode
      number returned by stat64() or getdents64() to differentiate files, and
      failing because the 64-bit inode number space was compressed to 32-bits, and
      so overlaps occur.
      
      This patch:
      
      Make filldir_t take a 64-bit inode number and struct kstat carry a 64-bit
      inode number so that 64-bit inode numbers can be passed back to userspace.
      
      The stat functions then returns the full 64-bit inode number where
      available and where possible.  If it is not possible to represent the inode
      number supplied by the filesystem in the field provided by userspace, then
      error EOVERFLOW will be issued.
      
      Similarly, the getdents/readdir functions now pass the full 64-bit inode
      number to userspace where possible, returning EOVERFLOW instead when a
      directory entry is encountered that can't be properly represented.
      
      Note that this means that some inodes will not be stat'able on a 32-bit
      system with old libraries where they were before - but it does mean that
      there will be no ambiguity over what a 32-bit inode number refers to.
      
      Note similarly that directory scans may be cut short with an error on a
      32-bit system with old libraries where the scan would work before for the
      same reasons.
      
      It is judged unlikely that this situation will occur because modern glibc
      uses 64-bit capable versions of stat and getdents class functions
      exclusively, and that older systems are unlikely to encounter
      unrepresentable inode numbers anyway.
      
      [akpm: alpha build fix]
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      afefdbb2
  15. 01 10月, 2006 11 次提交
  16. 30 9月, 2006 5 次提交
  17. 27 9月, 2006 1 次提交