mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
fsstress: fix incorrect if condition check for collapse range mode
There is if condition to be block aligned for off and len of Collapse range. But off and len for all fallocate opearion can be aligned by incorrect if condition check. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Ashish Sangwan <a.sangwan@samsung.com> Reviewed-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
committed by
Dave Chinner
parent
ec08236ff7
commit
995a459e7a
+1
-1
@@ -2230,7 +2230,7 @@ do_fallocate(int opno, long r, int mode)
|
||||
* Collapse range requires off and len to be block aligned, make it
|
||||
* more likely to be the case.
|
||||
*/
|
||||
if (FALLOC_FL_COLLAPSE_RANGE && (opno % 2)) {
|
||||
if ((mode & FALLOC_FL_COLLAPSE_RANGE) && (opno % 2)) {
|
||||
off = ((off + stb.st_blksize - 1) & ~(stb.st_blksize - 1));
|
||||
len = ((len + stb.st_blksize - 1) & ~(stb.st_blksize - 1));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user