Skip to content
Commit 95125d51 authored by Ryan Ding's avatar Ryan Ding Committed by Greg Kroah-Hartman
Browse files

ocfs2: direct write will call ocfs2_rw_unlock() twice when doing aio+dio

commit aa1057b3 upstream.

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 7da839c4 ("ocfs2: use
__generic_file_write_iter()").

Orabug: 21612107
Fixes: 7da839c4

 ("ocfs2: use __generic_file_write_iter()")
Signed-off-by: default avatarRyan Ding <ryan.ding@oracle.com>
Reviewed-by: default avatarJunxiao 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>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7548d27d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment