/* We always return the lock_depth we had before calling this function.  */
int reiserfs_write_lock_once(struct super_block *s)
/* We always return the lock_depth we had before calling this function.  */
int reiserfs_write_lock_once(struct super_block *s)
{
	struct reiserfs_sb_info *sb_i = REISERFS_SB(s);
	if (sb_i->lock_owner != current) {
		mutex_lock(&sb_i->lock);
		sb_i->lock_owner = current;
		return sb_i->lock_depth++;
	}
	return sb_i->lock_depth;
}