From: Christoph Hellwig Date: Sun, 4 Sep 2005 22:28:02 +0000 (+1000) Subject: [XFS] allow a null behaviour pointer in linvfs_clear_inode X-Git-Tag: v2.6.14-rc1~526^2~8 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02ba71de98d5eee63e82cc2d88f9ea8430810a9a;p=linux-2.6 [XFS] allow a null behaviour pointer in linvfs_clear_inode SGI-PV: 940531 SGI-Modid: xfs-linux:xfs-kern:197782a Signed-off-by: Christoph Hellwig Signed-off-by: Nathan Scott --- diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index cd3f8b3270..910e43bfc9 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c @@ -387,14 +387,17 @@ linvfs_clear_inode( vn_trace_entry(vp, "clear_inode", (inst_t *)__return_address); - ASSERT(vp->v_fbhv != NULL); - XFS_STATS_INC(vn_rele); XFS_STATS_INC(vn_remove); XFS_STATS_INC(vn_reclaim); XFS_STATS_DEC(vn_active); - VOP_INACTIVE(vp, NULL, cache); + /* + * This can happen because xfs_iget_core calls xfs_idestroy if we + * find an inode with di_mode == 0 but without IGET_CREATE set. + */ + if (vp->v_fbhv) + VOP_INACTIVE(vp, NULL, cache); VN_LOCK(vp); vp->v_flag &= ~VMODIFIED;