patch-2.0.27 linux/fs/fat/inode.c

Next file: linux/fs/smbfs/dir.c
Previous file: linux/fs/Config.in
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.26/linux/fs/fat/inode.c linux/fs/fat/inode.c
@@ -48,13 +48,12 @@
 	}
 	inode->i_size = 0;
 	fat_truncate(inode);
-	clear_inode(inode);
 	if (depend) {
 		if (MSDOS_I(depend)->i_old != inode) {
 			printk("Invalid link (0x%p): expected 0x%p, got 0x%p\n",
 			    depend, inode, MSDOS_I(depend)->i_old);
 			fat_fs_panic(sb,"...");
-			return;
+			goto done;
 		}
 		MSDOS_I(depend)->i_old = NULL;
 		iput(depend);
@@ -64,11 +63,13 @@
 			printk("Invalid link (0x%p): expected 0x%p, got 0x%p\n",
 			    linked, inode, MSDOS_I(linked)->i_oldlink);
 			fat_fs_panic(sb,"...");
-			return;
+			goto done;
 		}
 		MSDOS_I(linked)->i_oldlink = NULL;
 		iput(linked);
 	}
+done:
+	clear_inode(inode);
 }
 
 

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