[XFS] Ensure file size updates have been completed before writing inode to disk.
SGI-PV: 968767 SGI-Modid: xfs-linux-melb:xfs-kern:29675a Signed-off-by: Lachlan McIlroy <lachlan@sgi.com> Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
This commit is contained in:
committed by
Tim Shimmin
parent
65de556756
commit
776a75fa5c
@ -415,8 +415,10 @@ xfs_fs_write_inode(
|
||||
|
||||
if (vp) {
|
||||
vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address);
|
||||
if (sync)
|
||||
if (sync) {
|
||||
filemap_fdatawait(inode->i_mapping);
|
||||
flags |= FLUSH_SYNC;
|
||||
}
|
||||
error = bhv_vop_iflush(vp, flags);
|
||||
if (error == EAGAIN)
|
||||
error = sync? bhv_vop_iflush(vp, flags | FLUSH_LOG) : 0;
|
||||
|
Reference in New Issue
Block a user