summaryrefslogtreecommitdiff
path: root/fs/coda/cnode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/coda/cnode.c')
-rw-r--r--fs/coda/cnode.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/coda/cnode.c b/fs/coda/cnode.c
index 12de14e7b0c5..53208881d9c4 100644
--- a/fs/coda/cnode.c
+++ b/fs/coda/cnode.c
@@ -194,9 +194,14 @@ struct inode *coda_fid_to_inode(ViceFid *fid, struct super_block *sb)
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();