From: NeilBrown Date: Fri, 13 Aug 2010 03:56:57 +0000 (+1000) Subject: iget_my_inode - fix for case of ino == NULL X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=170bae53882ee8c1525989ea15483b0a2c095828;p=LaFS.git iget_my_inode - fix for case of ino == NULL igrab doesn't handle NULL inodes, so we must. Signed-off-by: NeilBrown --- diff --git a/lafs.h b/lafs.h index 7d086df..48bb260 100644 --- a/lafs.h +++ b/lafs.h @@ -400,7 +400,9 @@ static inline void rcu_iput(struct inode *ino) static inline struct inode *iget_my_inode(struct datablock *db) { struct inode *ino = rcu_my_inode(db); - struct inode *rv = igrab(ino); + struct inode *rv = NULL; + if (ino) + rv = igrab(ino); rcu_iput(ino); return rv; }