1. 30 6月, 2011 28 次提交
  2. 29 6月, 2011 5 次提交
  3. 28 6月, 2011 7 次提交
    • N
      md: avoid endless recovery loop when waiting for fail device to complete. · 4274215d
      NeilBrown 提交于
      If a device fails in a way that causes pending request to take a while
      to complete, md will not be able to immediately remove it from the
      array in remove_and_add_spares.
      It will then incorrectly look like a spare device and md will try to
      recover it even though it is failed.
      This leads to a recovery process starting and instantly aborting over
      and over again.
      
      We should check if the device is faulty before considering it to be a
      spare.  This will avoid trying to start a recovery that cannot
      proceed.
      
      This bug was introduced in 2.6.26 so that patch is suitable for any
      kernel since then.
      
      Cc: stable@kernel.org
      Reported-by: NJim Paradis <james.paradis@stratus.com>
      Signed-off-by: NNeilBrown <neilb@suse.de>
      4274215d
    • H
      drm/i915: more struct_mutex locking · ecbec53b
      Hugh Dickins 提交于
      When auditing the locking in i915_gem.c (for a prospective change which
      I then abandoned), I noticed two places where struct_mutex is not held
      across GEM object manipulations that would usually require it.
      
      Since one is in initial setup and the other in driver unload, I'm
      guessing the mutex is not required for either; but post a patch in case
      it is.
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Keith Packard <keithp@keithp.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ecbec53b
    • H
      drm/i915: use shmem_truncate_range · e2377fe0
      Hugh Dickins 提交于
      The interface to ->truncate_range is changing very slightly: once "tmpfs:
      take control of its truncate_range" has been applied, this can be applied.
       For now there is only a slight inefficiency while this remains unapplied,
      but it will soon become essential for managing shmem's use of swap.
      
      Change i915_gem_object_truncate() to use shmem_truncate_range() directly:
      which should also spare i915 later change if we switch from
      inode_operations->truncate_range to file_operations->fallocate.
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Keith Packard <keithp@keithp.com>
      Cc: Dave Airlie <airlied@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e2377fe0
    • H
      drm/i915: use shmem_read_mapping_page · 5949eac4
      Hugh Dickins 提交于
      Soon tmpfs will stop supporting ->readpage and read_cache_page_gfp(): once
      "tmpfs: add shmem_read_mapping_page_gfp" has been applied, this patch can
      be applied to ease the transition.
      
      Make i915_gem_object_get_pages_gtt() use shmem_read_mapping_page_gfp() in
      the one place it's needed; elsewhere use shmem_read_mapping_page(), with
      the mapping's gfp_mask properly initialized.
      
      Forget about __GFP_COLD: since tmpfs initializes its pages with memset,
      asking for a cold page is counter-productive.
      
      Include linux/shmem_fs.h also in drm_gem.c: with shmem_file_setup() now
      declared there too, we shall remove the prototype from linux/mm.h later.
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Keith Packard <keithp@keithp.com>
      Cc: Dave Airlie <airlied@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5949eac4
    • H
      drm/ttm: use shmem_read_mapping_page · 3142b651
      Hugh Dickins 提交于
      Soon tmpfs will stop supporting ->readpage and read_mapping_page(): once
      "tmpfs: add shmem_read_mapping_page_gfp" has been applied, this patch can
      be applied to ease the transition.
      
      ttm_tt_swapin() and ttm_tt_swapout() use shmem_read_mapping_page() in
      place of read_mapping_page(), since their swap_space has been created with
      shmem_file_setup().
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Thomas Hellstrom <thellstrom@vmware.com>
      Cc: Dave Airlie <airlied@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3142b651
    • A
      drivers/tty/serial/8250_pci.c: fix warning · a39bce7b
      Andrew Morton 提交于
      Fis the warning
      
        drivers/tty/serial/8250_pci.c:1457: warning: initialization from incompatible pointer type
      
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a39bce7b
    • R
      drivers/misc/ioc4.c: fix section mismatch / race condition · 1fc6e987
      Ralf Baechle 提交于
      Fix this section mismatch:
      
        WARNING: drivers/misc/ioc4.o(.data+0x144): Section mismatch in reference from the variable ioc4_load_modules_work to the function .devinit.text:ioc4_load_modules()
        The variable ioc4_load_modules_work references
        the function __devinit ioc4_load_modules()
        If the reference is valid then annotate the
        variable with __init* or __refdata (see linux/init.h) or name the variable:
        *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
      
      This one is potentially fatal; by the time ioc4_load_modules is invoked
      it may already have been freed.  For that reason ioc4_load_modules_work
      can't be turned to __devinitdata but also because it's referenced in
      ioc4_exit.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Acked-by: NBrent Casavant <bcasavan@sgi.com>
      Cc: Tejun Heo <tj@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1fc6e987