public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marin Mitov <mitov@issp.bas.bg>
To: linux-kernel@vger.kernel.org
Cc: Al Viro <viro@zeniv.linux.org.uk>
Subject: [BUG][reiserfs] page fault during kernel boot
Date: Tue, 17 Aug 2010 11:25:25 +0300	[thread overview]
Message-ID: <201008171125.25956.mitov@issp.bas.bg> (raw)

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);

             reply	other threads:[~2010-08-17  8:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-17  8:25 Marin Mitov [this message]
2010-08-17 22:20 ` [BUG][reiserfs] page fault during kernel boot Frederic Weisbecker
2010-08-17 22:30 ` Frederic Weisbecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201008171125.25956.mitov@issp.bas.bg \
    --to=mitov@issp.bas.bg \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox