patch-2.1.43 linux/fs/ext2/balloc.c

Next file: linux/fs/ext2/dir.c
Previous file: linux/fs/exec.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.42/linux/fs/ext2/balloc.c linux/fs/ext2/balloc.c
@@ -291,6 +291,7 @@
 		printk ("ext2_new_block: nonexistent device");
 		return 0;
 	}
+retry:
 	lock_super (sb);
 	es = sb->u.ext2_sb.s_es;
 	if (le32_to_cpu(es->s_free_blocks_count) <= le32_to_cpu(es->s_r_blocks_count) &&
@@ -298,6 +299,8 @@
 	     (sb->u.ext2_sb.s_resgid == 0 ||
 	      !in_group_p (sb->u.ext2_sb.s_resgid)))) {
 		unlock_super (sb);
+		if(sb->s_ibasket && free_ibasket(sb))
+			goto retry;
 		return 0;
 	}
 
@@ -389,6 +392,8 @@
 	}
 	if (k >= sb->u.ext2_sb.s_groups_count) {
 		unlock_super (sb);
+		if(sb->s_ibasket && free_ibasket(sb))
+			goto retry;
 		return 0;
 	}
 	bitmap_nr = load_block_bitmap (sb, i);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov