From patchwork Tue Jan 14 16:26:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Shilong X-Patchwork-Id: 3486601 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5DA1C9F39C for ; Tue, 14 Jan 2014 16:27:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4F19B201C8 for ; Tue, 14 Jan 2014 16:26:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3EFB22022F for ; Tue, 14 Jan 2014 16:26:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751946AbaANQ0z (ORCPT ); Tue, 14 Jan 2014 11:26:55 -0500 Received: from mail-pd0-f173.google.com ([209.85.192.173]:45312 "EHLO mail-pd0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751917AbaANQ0x (ORCPT ); Tue, 14 Jan 2014 11:26:53 -0500 Received: by mail-pd0-f173.google.com with SMTP id p10so8986534pdj.32 for ; Tue, 14 Jan 2014 08:26:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=M1ZdLapkRdqALrk52bHKXgJTK/7RlaLDxcr4EYiX02w=; b=BMBXgKiONMQeTI8urnqFVQBZ338nDkg+qbi5c0HJ3YWNZMjv6OYUEZ4oK+1VoW+z3b upb5H9DvqIzwv8XOwRJPAp1SmQfdDkgLt41/uJEOoOkQPRbm2vgjX9qU1edevbDOY5zn f0rD/ayNQivFhndNAmNxn4iGo2Ua8Uejip1ppgT7GFYYmEeWsBygKNtW9+EYluFcf/9f t1vNSQZO2lIkcCjz/IpWFa3uSsgjopl9tjLsp5jN8eNwxp/NmbTn0tWQbxzBBRCKfJy9 er3JI+hDqLNmHvWI49lluW5COGBDetAmXW8OYUHH6VPguhZ0WAOil4FUcydTDCVuo5xN kr9Q== X-Received: by 10.66.230.233 with SMTP id tb9mr2856829pac.38.1389716813419; Tue, 14 Jan 2014 08:26:53 -0800 (PST) Received: from linux-b0ol.localdomain ([223.65.189.206]) by mx.google.com with ESMTPSA id lh13sm2782922pab.4.2014.01.14.08.26.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Jan 2014 08:26:52 -0800 (PST) From: Wang Shilong To: linux-btrfs@vger.kernel.org Subject: [PATCH] Btrfs: fix wrong search path initialization before searching tree root Date: Wed, 15 Jan 2014 00:26:43 +0800 Message-Id: <1389716803-2415-2-git-send-email-wangshilong1991@gmail.com> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1389716803-2415-1-git-send-email-wangshilong1991@gmail.com> References: <1389716803-2415-1-git-send-email-wangshilong1991@gmail.com> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wang Shilong To search tree root without transaction protection, we should neither search commit root nor skip locking here, fix it. Signed-off-by: Wang Shilong --- fs/btrfs/send.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 54665d4..14f9693 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -2095,7 +2095,7 @@ static int send_subvol_begin(struct send_ctx *sctx) char *name = NULL; int namelen; - path = alloc_path_for_send(); + path = btrfs_alloc_path(); if (!path) return -ENOMEM;