uniontech inclusion category: bugfix bugzilla: NA CVE: NA
----------
If it can't be divided, minimum_size need to add another byte.
Signed-off-by: Gou Hao gouhao@uniontech.com --- fs/eulerfs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/eulerfs/super.c b/fs/eulerfs/super.c index 43fc717002d7..20c7fe845b6c 100644 --- a/fs/eulerfs/super.c +++ b/fs/eulerfs/super.c @@ -216,7 +216,7 @@ static bool eufs_check_size(struct super_block *sb, unsigned long size) /* For Super Block */ minimum_size = 2 << sb->s_blocksize_bits; /* For Bitmaps */ - minimum_size += size / EUFS_BLOCK_SIZE / 8; + minimum_size += DIV_ROUND_UP(size / EUFS_BLOCK_SIZE, 8);
if (size < minimum_size) return false;