1. 12 6月, 2009 3 次提交
  2. 23 5月, 2009 1 次提交
  3. 09 5月, 2009 1 次提交
  4. 01 5月, 2009 1 次提交
    • J
      ocfs2: Fix a missing credit when deleting from indexed directories. · dfa13f39
      Joel Becker 提交于
      The ocfs2 directory index updates two blocks when we remove an entry -
      the dx root and the dx leaf.  OCFS2_DELETE_INODE_CREDITS was only
      accounting for the dx leaf.  This shows up when ocfs2_delete_inode()
      runs out of credits in jbd2_journal_dirty_metadata() at
      "J_ASSERT_JH(jh, handle->h_buffer_credits > 0);".
      
      The test that caught this was running dirop_file_racer from the
      ocfs2-test suite with a 250-character filename PREFIX.  Run on a 512B
      blocksize, it forces the orphan dir index to grow large enough to
      trigger.
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      dfa13f39
  5. 30 4月, 2009 1 次提交
  6. 24 4月, 2009 1 次提交
  7. 22 4月, 2009 2 次提交
  8. 15 4月, 2009 1 次提交
  9. 08 4月, 2009 1 次提交
  10. 07 4月, 2009 1 次提交
    • M
      splice: fix deadlock in splicing to file · 7bfac9ec
      Miklos Szeredi 提交于
      There's a possible deadlock in generic_file_splice_write(),
      splice_from_pipe() and ocfs2_file_splice_write():
      
       - task A calls generic_file_splice_write()
       - this calls inode_double_lock(), which locks i_mutex on both
         pipe->inode and target inode
       - ordering depends on inode pointers, can happen that pipe->inode is
         locked first
       - __splice_from_pipe() needs more data, calls pipe_wait()
       - this releases lock on pipe->inode, goes to interruptible sleep
       - task B calls generic_file_splice_write(), similarly to the first
       - this locks pipe->inode, then tries to lock inode, but that is
         already held by task A
       - task A is interrupted, it tries to lock pipe->inode, but fails, as
         it is already held by task B
       - ABBA deadlock
      
      Fix this by explicitly ordering locks: the outer lock must be on
      target inode and the inner lock (which is later unlocked and relocked)
      must be on pipe->inode.  This is OK, pipe inodes and target inodes
      form two nonoverlapping sets, generic_file_splice_write() and friends
      are not called with a target which is a pipe.
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      Acked-by: NMark Fasheh <mfasheh@suse.com>
      Acked-by: NJens Axboe <jens.axboe@oracle.com>
      Cc: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7bfac9ec
  11. 04 4月, 2009 27 次提交