mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 19:07:52 +00:00
[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: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
This commit is contained in:
parent
76bf105cb1
commit
3471394ba5
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue