Commit 669b5449 authored by Nathan Scott's avatar Nathan Scott Committed by Nathan Scott

[XFS] Fix a possible data loss issue after an unaligned unwritten

extent write.

SGI Modid: xfs-linux:xfs-kern:174810a
Signed-off-by: default avatarNathan Scott <nathans@sgi.com>
parent 15aac141
......@@ -868,7 +868,8 @@ xfs_iomap_write_unwritten(
&ip->i_iocore, offset, count);
offset_fsb = XFS_B_TO_FSBT(mp, offset);
count_fsb = XFS_B_TO_FSB(mp, count);
count_fsb = XFS_B_TO_FSB(mp, (xfs_ufsize_t)offset + count);
count_fsb = (xfs_filblks_t)(count_fsb - offset_fsb);
do {
nres = XFS_DIOSTRAT_SPACE_RES(mp, 0);
......
Markdown is supported
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