1. 11 5月, 2011 32 次提交
  2. 10 5月, 2011 8 次提交
    • R
      nilfs2: fix infinite loop in nilfs_palloc_freev function · 349dbc36
      Ryusuke Konishi 提交于
      After having applied commit 9954e7af ("nilfs2: add free
      entries count only if clear bit operation succeeded"), a free routine
      of nilfs came to fall into an infinite loop, outputting the same
      message endlessly:
      
       nilfs_palloc_freev: entry number 29497 already freed
       nilfs_palloc_freev: entry number 29497 already freed
       nilfs_palloc_freev: entry number 29497 already freed
       nilfs_palloc_freev: entry number 29497 already freed
       nilfs_palloc_freev: entry number 29497 already freed ...
      
      That patch broke the routine so that a loop counter is never updated
      in an abnormal state.  This fixes the regression.
      Signed-off-by: NRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      349dbc36
    • M
      net/9p: Handle get_user_pages_fast return properly · 3cd79678
      M. Mohan Kumar 提交于
      Use proper data type to handle get_user_pages_fast error condition. Also
      do not treat EFAULT error as fatal.
      Signed-off-by: NM. Mohan Kumar <mohan@in.ibm.com>
      Signed-off-by: NVenkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      3cd79678
    • L
      Linux 2.6.39-rc7 · 693d92a1
      Linus Torvalds 提交于
      693d92a1
    • H
      vm: fix vm_pgoff wrap in upward expansion · 42c36f63
      Hugh Dickins 提交于
      Commit a626ca6a ("vm: fix vm_pgoff wrap in stack expansion") fixed
      the case of an expanding mapping causing vm_pgoff wrapping when you had
      downward stack expansion.  But there was another case where IA64 and
      PA-RISC expand mappings: upward expansion.
      
      This fixes that case too.
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Cc: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      42c36f63
    • L
      Merge branch 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6 · c191f6cc
      Linus Torvalds 提交于
      * 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6:
        drm/i915/lvds: Only act on lid notify when the device is on
        drm/i915: fix intel_crtc_clock_get pipe reads after "cleanup cleanup"
        drm/i915: Only enable the plane after setting the fb base (pre-ILK)
        drm/i915/dp: Be paranoid in case we disable a DP before it is attached
        drm/i915: Release object along create user fb error path
      c191f6cc
    • D
      xfs: fix race condition in AIL push trigger · 7ac95657
      Dave Chinner 提交于
      The recent conversion of the xfsaild functionality to a work queue
      introduced a hard-to-hit log space grant hang. One is caused by a
      race condition in determining whether there is a psh in progress or
      not.
      
      The XFS_AIL_PUSHING_BIT is used to determine whether a push is
      currently in progress.  When the AIL push work completes, it checked
      whether the target changed and cleared the PUSHING bit to allow a
      new push to be requeued. The race condition is as follows:
      
      	Thread 1		push work
      
      	smp_wmb()
      				smp_rmb()
      				check ailp->xa_target unchanged
      	update ailp->xa_target
      	test/set PUSHING bit
      	does not queue
      				clear PUSHING bit
      				does not requeue
      
      Now that the push target is updated, new attempts to push the AIL
      will not trigger as the push target will be the same, and hence
      despite trying to push the AIL we won't ever wake it again.
      
      The fix is to ensure that the AIL push work clears the PUSHING bit
      before it checks if the target is unchanged.
      
      As a result, both push triggers operate on the same test/set bit
      criteria, so even if we race in the push work and miss the target
      update, the thread requesting the push will still set the PUSHING
      bit and queue the push work to occur. For safety sake, the same
      queue check is done if the push work detects the target change,
      though only one of the two will will queue new work due to the use
      of test_and_set_bit() checks.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NAlex Elder <aelder@sgi.com>
      
      (cherry picked from commit e4d3c4a4)
      7ac95657
    • D
      xfs: make AIL target updates and compares 32bit safe. · fe0da767
      Dave Chinner 提交于
      The recent conversion of the xfsaild functionality to a work queue
      introduced a hard-to-hit log space grant hang. One of the problems
      noticed was that updates of the push target are not 32 bit safe as
      the target is a 64 bit value.
      
      We cannot copy a 64 bit LSN without the possibility of corrupting
      the result when racing with another updating thread. We have
      function to do this update safely without needing to care about
      32/64 bit issues - xfs_trans_ail_copy_lsn() - so use that when
      updating the AIL push target.
      
      Also move the reading of the target in the push work inside the AIL
      lock, and use XFS_LSN_CMP() for the unlocked comparison during work
      termination to close read holes as well.
      Signed-off-by: NDave Chinner <david@fromorbit.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NAlex Elder <aelder@sgi.com>
      
      (cherry picked from commit fd5670f2)
      fe0da767
    • D
      xfs: always push the AIL to the target · 50e86686
      Dave Chinner 提交于
      The recent conversion of the xfsaild functionality to a work queue
      introduced a hard-to-hit log space grant hang. One of the problems
      discovered is a target mismatch between the item pushing loop and
      the target itself.
      
      The push trigger checks for the target increasing (i.e. new target >
      current) while the push loop only pushes items that have a LSN <
      current. As a result, we can get the situation where the push target
      is X, the items at the tail of the AIL have LSN X and they don't get
      pushed. The push work then completes thinking it is done, and cannot
      be restarted until the push target increases to >= X + 1. If the
      push target then never increases (because the tail is not moving),
      then we never run the push work again and we stall.
      
      Fix it by making sure log items with a LSN that matches the target
      exactly are pushed during the loop.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NAlex Elder <aelder@sgi.com>
      
      (cherry picked from commit cb64026b)
      50e86686