ext4: fix ext4_end_io_dio() racing against fsync()
authorTheodore Ts'o <tytso@mit.edu>
Mon, 12 Dec 2011 15:53:02 +0000 (10:53 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 12 Dec 2011 15:53:02 +0000 (10:53 -0500)
We need to make sure iocb->private is cleared *before* we put the
io_end structure on i_completed_io_list.  Otherwise fsync() could
potentially run on another CPU and free the iocb structure out from
under us.

Reported-by: Kent Overstreet <koverstreet@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@kernel.org

No differences found