From patchwork Tue Dec 7 01:51:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Zefan X-Patchwork-Id: 380992 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oB71nokC029064 for ; Tue, 7 Dec 2010 01:49:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754008Ab0LGBtr (ORCPT ); Mon, 6 Dec 2010 20:49:47 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:52241 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1753605Ab0LGBtr (ORCPT ); Mon, 6 Dec 2010 20:49:47 -0500 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id 0C1671709CC; Tue, 7 Dec 2010 09:49:45 +0800 (CST) Received: from mailserver.fnst.cn.fujitus.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id oB71j2IN019161; Tue, 7 Dec 2010 09:45:03 +0800 Received: from lizf.localdomain ([10.167.225.51]) by mailserver.fnst.cn.fujitus.com (Lotus Domino Release 8.5.1FP4) with ESMTP id 2010120709494973-172018 ; Tue, 7 Dec 2010 09:49:49 +0800 Message-ID: <4CFD931E.6050503@cn.fujitsu.com> Date: Tue, 07 Dec 2010 09:51:26 +0800 From: Li Zefan User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Thunderbird/3.0b2 MIME-Version: 1.0 To: "linux-btrfs@vger.kernel.org" CC: Michael Niederle , C Anthony Risinger Subject: [PATCH] Btrfs: Fix a crash when mounting a subvolume X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.1FP4|July 25, 2010) at 2010-12-07 09:49:49, Serialize by Router on mailserver/fnst(Release 8.5.1FP4|July 25, 2010) at 2010-12-07 09:49:51, Serialize complete at 2010-12-07 09:49:51 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 07 Dec 2010 01:49:51 +0000 (UTC) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 47bf67c..61bd79a 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -685,9 +685,9 @@ static int btrfs_get_sb(struct file_system_type *fs_type, int flags, mutex_unlock(&root->d_inode->i_mutex); if (IS_ERR(new_root)) { + dput(root); deactivate_locked_super(s); error = PTR_ERR(new_root); - dput(root); goto error_free_subvol_name; } if (!new_root->d_inode) {