提交 3471394b 编写于 作者: C Christoph Hellwig 提交者: Lachlan McIlroy

[XFS] fix instant oops with tracing enabled

We can only read inode->i_count if the inode is actually there and not a
NULL pointer. This was introduced in one of the recent sync patches.

SGI-PV: 988255

SGI-Modid: xfs-linux-melb:xfs-kern:32315a
Signed-off-by: NChristoph Hellwig <hch@infradead.org>
Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
上级 76bf105c
......@@ -92,7 +92,7 @@ static inline int xfs_icount(struct xfs_inode *ip)
{
struct inode *inode = VFS_I(ip);
if (!inode)
if (inode)
return atomic_read(&inode->i_count);
return -1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册