patch-2.4.10 linux/fs/sysv/balloc.c

Next file: linux/fs/sysv/inode.c
Previous file: linux/fs/sysv/Makefile
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.9/linux/fs/sysv/balloc.c linux/fs/sysv/balloc.c
@@ -46,6 +46,14 @@
 	unsigned count;
 	unsigned block = fs32_to_cpu(sb, nr);
 
+	/*
+	 * This code does not work at all for AFS (it has a bitmap
+	 * free list).  As AFS is supposed to be read-only no one
+	 * should call this for an AFS filesystem anyway...
+	 */
+	if (sb->sv_type == FSTYPE_AFS)
+		return;
+
 	if (block < sb->sv_firstdatazone || block >= sb->sv_nzones) {
 		printk("sysv_free_block: trying to free block not in datazone\n");
 		return;
@@ -153,6 +161,14 @@
 	u32 *blocks;
 	unsigned block;
 	int n;
+
+	/*
+	 * This code does not work at all for AFS (it has a bitmap
+	 * free list).  As AFS is supposed to be read-only we just
+	 * lie and say it has no free block at all.
+	 */
+	if (sb->sv_type == FSTYPE_AFS)
+		return 0;
 
 	lock_super(sb);
 	sb_count = fs32_to_cpu(sb, *sb->sv_free_blocks);

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