]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ocfs2: direct write will call ocfs2_rw_unlock() twice when doing aio+dio
authorRyan Ding <ryan.ding@oracle.com>
Mon, 7 Sep 2015 05:38:00 +0000 (13:38 +0800)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Tue, 8 Sep 2015 18:12:58 +0000 (11:12 -0700)
commitf89f7188de2228c8894b5aab2a4105028f23f267
tree631065cf903aeaa46f8cd29b4ae864f61b6f2afa
parent41e2de9f10f4b04a8a604411164e4770037cea54
ocfs2: direct write will call ocfs2_rw_unlock() twice when doing aio+dio

ocfs2_file_write_iter() is usng the wrong return value ('written').  This
will cause ocfs2_rw_unlock() be called both in write_iter & end_io,
triggering a BUG_ON.

This issue was introduced by commit 7da839c47589 ("ocfs2: use
__generic_file_write_iter()").

Orabug: 21612107
Fixes: 7da839c47589 ("ocfs2: use __generic_file_write_iter()")
Signed-off-by: Ryan Ding <ryan.ding@oracle.com>
Reviewed-by: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit aa1057b3dec478b20c77bad07442318ae36d893c)

Conflicts:
fs/ocfs2/file.c
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
fs/ocfs2/file.c