From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [PATCH] reiserfs: kill-the-BKL Date: Tue, 7 Apr 2009 15:40:17 +0200 Message-ID: <20090407134017.GA20556@elte.hu> References: <1239070789-13354-1-git-send-email-fweisbec@gmail.com> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: <1239070789-13354-1-git-send-email-fweisbec@gmail.com> Sender: reiserfs-devel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Frederic Weisbecker Cc: LKML , Jeff Mahoney , Peter Zijlstra , ReiserFS Development List , Bron Gondwana , Andrew Morton , Linus Torvalds , Alexander Viro * Frederic Weisbecker wrote: > +/* > + * Utility function to force a BUG if it is called without the superblock > + * write lock held. caller is the string printed just before calling BUG() > + */ > +void reiserfs_check_lock_depth(struct super_block *sb, char *caller) > +{ > + struct reiserfs_sb_info *sb_i = REISERFS_SB(sb); > + > + if (sb_i->lock_depth < 0) > + reiserfs_panic(sb, "%s called without kernel lock held %d", > + caller); s/kernel lock/sb write lock/ > + reiserfs_write_unlock(s); > + mutex_destroy(&REISERFS_SB(s)->lock); > kfree(s->s_fs_info); > s->s_fs_info = NULL; ah, mutex_destroy() - it's a small detail but still nice ;-) Anyway, it still looks good to me, after the earlier patch i reviewed. Would be nice to have the testing feedback of reiserfs users, and the locking review from anyone who knows this code. Ingo