ext4: Fix data exposure after failed AIO DIO
authorJan Kara <jack@suse.cz>
Sun, 28 Feb 2016 21:36:38 +0000 (08:36 +1100)
committerDave Chinner <david@fromorbit.com>
Sun, 28 Feb 2016 21:36:38 +0000 (08:36 +1100)
commit74c66bcb7eda551f3b8588659c58fe29184af903
tree0d1f5bc2cb487890f23caf622138135c54dfd4a5
parentc19b104a67b3bb1ac48275a8a1c9df666e676c25
ext4: Fix data exposure after failed AIO DIO

When AIO DIO fails e.g. due to IO error, we must not convert unwritten
extents as that will expose uninitialized data. Handle this case
by clearing unwritten flag from io_end in case of error and thus
preventing extent conversion.

Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/ext4/ext4.h
fs/ext4/inode.c
fs/ext4/page-io.c