[BUG][reiserfs] page fault during kernel boot

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Marin Mitov
Date: Tuesday, August 17, 2010 - 1:25 am

Hi all,

The function: reiserfs_evict_inode() ends with:

<snip>
out:
	end_writeback(inode);	/* note this must go after the journal_end to prevent deadlock */
	dquot_drop(inode);
	inode->i_blocks = 0;
	reiserfs_write_unlock_once(inode->i_sb, depth);

no_delete:
	end_writeback(inode);
	dquot_drop(inode);
}
<snip>

When goto out path is taken,

end_writeback(inode);
dquot_drop(inode);

are executed twice, leading to page fault (in my case) during the kernel boot.

Add return; before no_delete label (but I am not quite sure that this is correct :-).

Signed-off-by: Marin Mitov <mitov@issp.bas.bg>

====================================================================
--- a/fs/reiserfs/inode.c	2010-08-17 09:51:27.000000000 +0300
+++ b/fs/reiserfs/inode.c	2010-08-17 10:45:20.000000000 +0300
@@ -78,11 +78,12 @@ void reiserfs_evict_inode(struct inode *
 		/* no object items are in the tree */
 		;
 	}
-      out:
+out:
 	end_writeback(inode);	/* note this must go after the journal_end to prevent deadlock */
 	dquot_drop(inode);
 	inode->i_blocks = 0;
 	reiserfs_write_unlock_once(inode->i_sb, depth);
+	return;
 
 no_delete:
 	end_writeback(inode);
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[BUG][reiserfs] page fault during kernel boot, Marin Mitov, (Tue Aug 17, 1:25 am)
Re: [BUG][reiserfs] page fault during kernel boot, Frederic Weisbecker, (Tue Aug 17, 3:20 pm)
Re: [BUG][reiserfs] page fault during kernel boot, Frederic Weisbecker, (Tue Aug 17, 3:30 pm)