Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759177AbcCDJYP (ORCPT ); Fri, 4 Mar 2016 04:24:15 -0500 Received: from mx2.suse.de ([195.135.220.15]:59710 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759039AbcCDJDd (ORCPT ); Fri, 4 Mar 2016 04:03:33 -0500 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" From: Jiri Slaby To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Filipe Manana , Jiri Slaby Subject: [PATCH 3.12 077/116] Btrfs: fix number of transaction units required to create symlink Date: Fri, 4 Mar 2016 10:02:02 +0100 Message-Id: <6f751109450760d466d678ea4971e54b0bb63273.1457082108.git.jslaby@suse.cz> X-Mailer: git-send-email 2.7.2 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1166 Lines: 38 From: Filipe Manana 3.12-stable review patch. If anyone has any objections, please let me know. =============== commit 9269d12b2d57d9e3d13036bb750762d1110d425c upstream. We weren't accounting for the insertion of an inline extent item for the symlink inode nor that we need to update the parent inode item (through the call to btrfs_add_nondir()). So fix this by including two more transaction units. Signed-off-by: Filipe Manana Signed-off-by: Jiri Slaby --- fs/btrfs/inode.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index c6f91432cc67..89b5868ccfc7 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -8417,9 +8417,11 @@ static int btrfs_symlink(struct inode *dir, struct dentry *dentry, /* * 2 items for inode item and ref * 2 items for dir items + * 1 item for updating parent inode item + * 1 item for the inline extent item * 1 item for xattr if selinux is on */ - trans = btrfs_start_transaction(root, 5); + trans = btrfs_start_transaction(root, 7); if (IS_ERR(trans)) return PTR_ERR(trans); -- 2.7.2