patch-2.4.2 linux/fs/coda/cnode.c

Next file: linux/fs/coda/psdev.c
Previous file: linux/fs/buffer.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.1/linux/fs/coda/cnode.c linux/fs/coda/cnode.c
@@ -194,8 +194,13 @@
 		return NULL;
 	}
 
-	/* check if this inode is linked to a cnode */
 	cii = ITOC(inode);
+
+	/* The inode might already be purged due to memory pressure */
+	if ( coda_fideq(&cii->c_fid, &NullFID) ) {
+		iput(inode);
+		return NULL;
+	}
 
 	/* we shouldn't have inode collisions anymore */
 	if ( !coda_fideq(fid, &cii->c_fid) ) BUG();

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