]> git.baikalelectronics.ru Git - kernel.git/commit
ocfs2: direct write will call ocfs2_rw_unlock() twice when doing aio+dio
authorRyan Ding <ryan.ding@oracle.com>
Fri, 4 Sep 2015 22:42:36 +0000 (15:42 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 4 Sep 2015 23:54:41 +0000 (16:54 -0700)
commit9e48063f8c2cff6ec4ca3a7653bfb27e99bcfc33
tree74d09f5e701f197a6f79d3d29cfe8b02e1e87496
parentbe4d3ffab04552a2452af58e47d8b201766fdd78
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 31b5bc8d3b87 ("ocfs2: use
__generic_file_write_iter()").

Orabug: 21612107
Fixes: 31b5bc8d3b87 ("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>
fs/ocfs2/file.c