Commit 68918988 authored by syphyr's avatar syphyr Committed by Bernhard Thoben
Browse files

ANDROID: sdcardfs: Wait for file flush to complete

Sdcardfs needs to wait for the file to finish writing before returning
an error.

Backport from 3.18 to 3.10 kernel.

Change-Id: I0fbdfd9a4c46ad34b8826099d9e3b255289d4794
parent 07ed016c
......@@ -297,8 +297,10 @@ static int sdcardfs_flush(struct file *file, fl_owner_t id)
struct file *lower_file = NULL;
lower_file = sdcardfs_lower_file(file);
if (lower_file && lower_file->f_op && lower_file->f_op->flush)
if (lower_file && lower_file->f_op && lower_file->f_op->flush) {
filemap_write_and_wait(file->f_mapping);
err = lower_file->f_op->flush(lower_file, id);
}
return err;
}
......
Supports Markdown
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