xfs
[Top] [All Lists]

fw: [PATCH] fix instant oops with tracing enabled

To: xfs@xxxxxxxxxxx
Subject: fw: [PATCH] fix instant oops with tracing enabled
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 14 Oct 2008 09:39:32 +1100
Cc: hch@xxxxxx
Mail-followup-to: xfs@xxxxxxxxxxx, hch@xxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
SGI folks,

Looks like Christoph is having problems posting to the list;
the spam filter is dropping all his mail. In the mean time,
here's a fix for an oops in the tracing code as a result of
the last check ins. I didn't see this because the "combine
inodes" patches removes xfs_icount altogether. If that
series is going to be included in the current round of checkins
then this patch probably isn't needed.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx


From: Christoph Hellwig <hch@xxxxxx>

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.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.c
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vnode.c     2008-10-13 
12:07:38.000000000 -0400
+++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.c  2008-10-13 12:07:47.000000000 
-0400
@@ -92,7 +92,7 @@ static inline int xfs_icount(struct xfs_
 {
        struct inode *inode = VFS_I(ip);
 
-       if (!inode)
+       if (inode)
                return atomic_read(&inode->i_count);
        return -1;
 }

<Prev in Thread] Current Thread [Next in Thread>