1. 01 6月, 2010 1 次提交
  2. 25 5月, 2010 4 次提交
    • N
      fs/splice.c: fix mapping_gfp_mask usage · 0ae0b5d0
      Nick Piggin 提交于
      mapping_gfp_mask() is not supposed to store allocation contex details,
      only page location details.  So mapping_gfp_mask should be applied to the
      pagecache page allocation, wheras normal (kernel mapped) memory should be
      used for surrounding allocations such as radix-tree nodes allocated by
      add_to_page_cache.  Context modifiers should be applied on a per-callsite
      basis.
      
      So change splice to follow this convention (which is followed in similar
      code patterns in core code).
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      0ae0b5d0
    • S
      cfq-iosched: fix an oops caused by slab leak · d02a2c07
      Shaohua Li 提交于
      I got below oops when unloading cfq-iosched. Considering scenario:
      queue A merge to B, C merge to D and B will be merged to D. Before B is merged
      to D, we do split B. We should put B's reference for D.
      
      [  807.768536] =============================================================================
      [  807.768539] BUG cfq_queue: Objects remaining on kmem_cache_close()
      [  807.768541] -----------------------------------------------------------------------------
      [  807.768543]
      [  807.768546] INFO: Slab 0xffffea0003e6b4e0 objects=26 used=1 fp=0xffff88011d584fd8 flags=0x200000000004082
      [  807.768550] Pid: 5946, comm: rmmod Tainted: G        W   2.6.34-07097-gf4b87dee-dirty #724
      [  807.768552] Call Trace:
      [  807.768560]  [<ffffffff81104e8d>] slab_err+0x8f/0x9d
      [  807.768564]  [<ffffffff811059e1>] ? flush_cpu_slab+0x0/0x93
      [  807.768569]  [<ffffffff8164be52>] ? add_preempt_count+0xe/0xca
      [  807.768572]  [<ffffffff8164bd9c>] ? sub_preempt_count+0xe/0xb6
      [  807.768577]  [<ffffffff81648871>] ? _raw_spin_unlock+0x15/0x30
      [  807.768580]  [<ffffffff8164bd9c>] ? sub_preempt_count+0xe/0xb6
      [  807.768584]  [<ffffffff811061bc>] list_slab_objects+0x9b/0x19f
      [  807.768588]  [<ffffffff8164bf0a>] ? add_preempt_count+0xc6/0xca
      [  807.768591]  [<ffffffff81109e27>] kmem_cache_destroy+0x13f/0x21d
      [  807.768597]  [<ffffffffa000ff13>] cfq_slab_kill+0x1a/0x43 [cfq_iosched]
      [  807.768601]  [<ffffffffa000ffcf>] cfq_exit+0x93/0x9e [cfq_iosched]
      [  807.768606]  [<ffffffff810973a2>] sys_delete_module+0x1b1/0x219
      [  807.768612]  [<ffffffff8102fb5b>] system_call_fastpath+0x16/0x1b
      [  807.768618] INFO: Object 0xffff88011d584618 @offset=1560
      [  807.768622] INFO: Allocated in cfq_get_queue+0x11e/0x274 [cfq_iosched] age=7173 cpu=1 pid=5496
      [  807.768626] =============================================================================
      
      Cc: stable@kernel.org
      Signed-off-by: NShaohua Li <shaohua.li@intel.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      d02a2c07
    • J
      pipe: make F_{GET,SET}PIPE_SZ deal with byte sizes · b9598db3
      Jens Axboe 提交于
      Instead of requiring an exact number of pages as the argument and
      return value, change the API to deal with number of bytes instead.
      
      This also relaxes the requirement that the passed in size must
      result in a power-of-2 page array size. Round up to the nearest
      power-of-2 automatically and return the resulting size of the pipe
      on success.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      b9598db3
    • J
      pipe: F_SETPIPE_SZ should return -EPERM for non-root · 0191f869
      Jens Axboe 提交于
      If the passed in size is larger than what has been set as the
      system wide limit and the user is not root, we want to return
      permission denied (not invalid value).
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      0191f869
  3. 24 5月, 2010 3 次提交
  4. 22 5月, 2010 32 次提交