]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
resize2fs: fix resizing large file systems when block size != page size
authorTheodore Ts'o <tytso@mit.edu>
Tue, 25 Oct 2016 17:18:14 +0000 (13:18 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 25 Oct 2016 17:18:14 +0000 (13:18 -0400)
Reported by: Jerry Lee <jerrylee@qnap.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
resize/main.c

index 5a99483c59f9692a842cbc7038095aca10d69f3a..396391b68520b9b69b9f39cb8a2c972a2a28b978 100644 (file)
@@ -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)) {