[PATCH][2.4.19-pre10] fs/ufs/super.c:ufs_read_super() fixes

From: Mikael Pettersson (mikpe@csd.uu.se)
Date: Mon Jun 17 2002 - 19:59:06 EST


There are three obvious errors:
1. When checking minimum fragment size the code references the
   wrong variable (block size).
2. Ditto when checking maximum fragment size.
3. (Minor) If the block size is too small, the wrong variable
   (fragment size) is printed in the error message.

The first two patches are already in the current 2.5 code.

/Mikael

--- linux-2.4.19-pre10/fs/ufs/super.c.~1~ Thu Jun 6 14:40:21 2002
+++ linux-2.4.19-pre10/fs/ufs/super.c Thu Jun 6 14:50:17 2002
@@ -662,12 +662,12 @@
                         uspi->s_fsize);
                 goto failed;
         }
- if (uspi->s_bsize < 512) {
+ if (uspi->s_fsize < 512) {
                 printk(KERN_ERR "ufs_read_super: fragment size %u is too small\n",
                         uspi->s_fsize);
                 goto failed;
         }
- if (uspi->s_bsize > 4096) {
+ if (uspi->s_fsize > 4096) {
                 printk(KERN_ERR "ufs_read_super: fragment size %u is too large\n",
                         uspi->s_fsize);
                 goto failed;
@@ -679,7 +679,7 @@
         }
         if (uspi->s_bsize < 4096) {
                 printk(KERN_ERR "ufs_read_super: block size %u is too small\n",
- uspi->s_fsize);
+ uspi->s_bsize);
                 goto failed;
         }
         if (uspi->s_bsize / uspi->s_fsize > 8) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jun 23 2002 - 22:00:15 EST