ocfs2: fix i_mutex locking in ocfs2_splice_to_file()
commitd60c0932c0c995c0076b2edc8b83df7ae71861fa
authorMiklos Szeredi <miklos@szeredi.hu>
Tue, 14 Apr 2009 17:48:39 +0000 (14 19:48 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 18 May 2009 23:35:25 +0000 (18 16:35 -0700)
tree504c4b44dad1747d510cbd9a921fbeeba1934c00
parent1aa8d5db832187c8e433a8db6c7e4e6c70ef69bb
ocfs2: fix i_mutex locking in ocfs2_splice_to_file()

commit 328eaaba4e41a04c1dc4679d65bea3fee4349d86 upstream.

Rearrange locking of i_mutex on destination and call to
ocfs2_rw_lock() so locks are only held while buffers are copied with
the pipe_to_file() actor, and not while waiting for more data on the
pipe.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ocfs2/file.c
fs/splice.c
include/linux/splice.h