Whamcloud - gitweb
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 5a99483..396391b 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)) {