From 170bae53882ee8c1525989ea15483b0a2c095828 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Fri, 13 Aug 2010 13:56:57 +1000 Subject: [PATCH] iget_my_inode - fix for case of ino == NULL igrab doesn't handle NULL inodes, so we must. Signed-off-by: NeilBrown --- lafs.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- 2.39.5