Whamcloud - gitweb
LU-6436 llite: NULL pointer dereference in cl_object_top()
[fs/lustre-release.git] / lustre / llite / namei.c
index f53818a..de168ab 100644 (file)
@@ -139,6 +139,9 @@ struct inode *ll_iget(struct super_block *sb, ino_t hash,
                        inode_has_no_xattr(inode);
                        unlock_new_inode(inode);
                }
+       } else if (is_bad_inode(inode)) {
+               iput(inode);
+               inode = ERR_PTR(-ESTALE);
        } else if (!(inode->i_state & (I_FREEING | I_CLEAR))) {
                rc = ll_update_inode(inode, md);
                CDEBUG(D_VFSTRACE, "got inode: "DFID"(%p): rc = %d\n",