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.
This commit is contained in:
parent
484e304cfc
commit
f7fe4074dd
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue