patch-2.4.0-test5 linux/fs/ext2/super.c

Next file: linux/fs/fat/cache.c
Previous file: linux/fs/ext2/inode.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test4/linux/fs/ext2/super.c linux/fs/ext2/super.c
@@ -107,8 +107,7 @@
 	for (i = 0; i < db_count; i++)
 		if (sb->u.ext2_sb.s_group_desc[i])
 			brelse (sb->u.ext2_sb.s_group_desc[i]);
-	kfree_s (sb->u.ext2_sb.s_group_desc,
-		 db_count * sizeof (struct buffer_head *));
+	kfree(sb->u.ext2_sb.s_group_desc);
 	for (i = 0; i < EXT2_MAX_GROUP_LOADED; i++)
 		if (sb->u.ext2_sb.s_inode_bitmap[i])
 			brelse (sb->u.ext2_sb.s_inode_bitmap[i]);
@@ -567,8 +566,7 @@
 		if (!sb->u.ext2_sb.s_group_desc[i]) {
 			for (j = 0; j < i; j++)
 				brelse (sb->u.ext2_sb.s_group_desc[j]);
-			kfree_s (sb->u.ext2_sb.s_group_desc,
-				 db_count * sizeof (struct buffer_head *));
+			kfree(sb->u.ext2_sb.s_group_desc);
 			printk ("EXT2-fs: unable to read group descriptors\n");
 			goto failed_mount;
 		}
@@ -576,8 +574,7 @@
 	if (!ext2_check_descriptors (sb)) {
 		for (j = 0; j < db_count; j++)
 			brelse (sb->u.ext2_sb.s_group_desc[j]);
-		kfree_s (sb->u.ext2_sb.s_group_desc,
-			 db_count * sizeof (struct buffer_head *));
+		kfree(sb->u.ext2_sb.s_group_desc);
 		printk ("EXT2-fs: group descriptors corrupted !\n");
 		goto failed_mount;
 	}
@@ -599,8 +596,7 @@
 		for (i = 0; i < db_count; i++)
 			if (sb->u.ext2_sb.s_group_desc[i])
 				brelse (sb->u.ext2_sb.s_group_desc[i]);
-		kfree_s (sb->u.ext2_sb.s_group_desc,
-			 db_count * sizeof (struct buffer_head *));
+		kfree(sb->u.ext2_sb.s_group_desc);
 		brelse (bh);
 		printk ("EXT2-fs: get root inode failed\n");
 		return NULL;
@@ -657,6 +653,7 @@
 	/*
 	 * Allow the "check" option to be passed as a remount option.
 	 */
+	new_mount_opt = sb->u.ext2_sb.s_mount_opt;
 	if (!parse_options (data, &tmp, &resuid, &resgid,
 			    &new_mount_opt))
 		return -EINVAL;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)