1. 12 Jul, 2012 2 commits
    • Tao Guo's avatar
      umem: fix up unplugging · a7afeb90
      Tao Guo authored
      commit 32587371 upstream.
      
      Fix a regression introduced by 7eaceacc ("block: remove per-queue
      plugging").  In that patch, Jens removed the whole mm_unplug_device()
      function, which used to be the trigger to make umem start to work.
      
      We need to implement unplugging to make umem start to work, or I/O will
      never be triggered.
      Signed-off-by: default avatarTao Guo <Tao.Guo@emc.com>
      Cc: Neil Brown <neilb@suse.de>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Shaohua Li <shli@kernel.org>
      Acked-by: default avatarNeilBrown <neilb@suse.de>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      a7afeb90
    • Eric Dumazet's avatar
      splice: fix racy pipe->buffers uses · 9558b2ab
      Eric Dumazet authored
      commit 047fe360 upstream.
      
      Dave Jones reported a kernel BUG at mm/slub.c:3474! triggered
      by splice_shrink_spd() called from vmsplice_to_pipe()
      
      commit 35f3d14d (pipe: add support for shrinking and growing pipes)
      added capability to adjust pipe->buffers.
      
      Problem is some paths don't hold pipe mutex and assume pipe->buffers
      doesn't change for their duration.
      
      Fix this by adding nr_pages_max field in struct splice_pipe_desc, and
      use it in place of pipe->buffers where appropriate.
      
      splice_shrink_spd() loses its struct pipe_inode_info argument.
      Reported-by: default avatarDave Jones <davej@redhat.com>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Tom Herbert <therbert@google.com>
      Tested-by: default avatarDave Jones <davej@redhat.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      [bwh: Backported to 3.2:
       - Adjust context in vmsplice_to_pipe()
       - Update one more call to splice_shrink_spd(), from skb_splice_bits()]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      9558b2ab
  2. 04 Jul, 2012 38 commits