Skip to content

Commit

Permalink
[XFS] fix instant oops with tracing enabled
Browse files Browse the repository at this point in the history
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: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
  • Loading branch information
Christoph Hellwig authored and Lachlan McIlroy committed Oct 30, 2008
1 parent 76bf105 commit 3471394
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/xfs/linux-2.6/xfs_vnode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3471394

Please sign in to comment.