From: Theodore Ts'o Date: Tue, 25 Oct 2016 17:18:14 +0000 (-0400) Subject: resize2fs: fix resizing large file systems when block size != page size X-Git-Tag: 1.43.4~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1e19b01be31fc5264a84d246023ecf29e44949df;p=thirdparty%2Fe2fsprogs.git resize2fs: fix resizing large file systems when block size != page size Reported by: Jerry Lee Signed-off-by: Theodore Ts'o --- diff --git a/resize/main.c b/resize/main.c index 5a99483c5..396391b68 100644 --- a/resize/main.c +++ b/resize/main.c @@ -505,7 +505,7 @@ int main (int argc, char ** argv) new_size = max_size; /* Round down to an even multiple of a pagesize */ if (sys_page_size > blocksize) - new_size &= ~((sys_page_size / blocksize)-1); + new_size &= ~((blk64_t)((sys_page_size / blocksize)-1)); } /* If changing 64bit, don't change the filesystem size. */ if (flags & (RESIZE_DISABLE_64BIT | RESIZE_ENABLE_64BIT)) {