aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ufs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ufs/super.c')
-rw-r--r--fs/ufs/super.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index 22ff6ed55ce9..2b3011689e89 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -87,6 +87,7 @@
87#include <linux/smp_lock.h> 87#include <linux/smp_lock.h>
88#include <linux/buffer_head.h> 88#include <linux/buffer_head.h>
89#include <linux/vfs.h> 89#include <linux/vfs.h>
90#include <linux/log2.h>
90 91
91#include "swab.h" 92#include "swab.h"
92#include "util.h" 93#include "util.h"
@@ -854,7 +855,7 @@ magic_found:
854 uspi->s_fmask = fs32_to_cpu(sb, usb1->fs_fmask); 855 uspi->s_fmask = fs32_to_cpu(sb, usb1->fs_fmask);
855 uspi->s_fshift = fs32_to_cpu(sb, usb1->fs_fshift); 856 uspi->s_fshift = fs32_to_cpu(sb, usb1->fs_fshift);
856 857
857 if (uspi->s_fsize & (uspi->s_fsize - 1)) { 858 if (!is_power_of_2(uspi->s_fsize)) {
858 printk(KERN_ERR "ufs_read_super: fragment size %u is not a power of 2\n", 859 printk(KERN_ERR "ufs_read_super: fragment size %u is not a power of 2\n",
859 uspi->s_fsize); 860 uspi->s_fsize);
860 goto failed; 861 goto failed;
@@ -869,7 +870,7 @@ magic_found:
869 uspi->s_fsize); 870 uspi->s_fsize);
870 goto failed; 871 goto failed;
871 } 872 }
872 if (uspi->s_bsize & (uspi->s_bsize - 1)) { 873 if (!is_power_of_2(uspi->s_bsize)) {
873 printk(KERN_ERR "ufs_read_super: block size %u is not a power of 2\n", 874 printk(KERN_ERR "ufs_read_super: block size %u is not a power of 2\n",
874 uspi->s_bsize); 875 uspi->s_bsize);
875 goto failed; 876 goto failed;