diff mbox

Btrfs: fix wrong search path initialization before searching tree root

Message ID 1389716803-2415-2-git-send-email-wangshilong1991@gmail.com (mailing list archive)
State Accepted
Headers show

Commit Message

Wang Shilong Jan. 14, 2014, 4:26 p.m. UTC
From: Wang Shilong <wangsl.fnst@cn.fujitsu.com>

To search tree root without transaction protection, we should neither search commit
root nor skip locking here, fix it.

Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
---
 fs/btrfs/send.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

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;