Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753986AbcCAXx1 (ORCPT ); Tue, 1 Mar 2016 18:53:27 -0500 Received: from mail177-1.suw61.mandrillapp.com ([198.2.177.1]:8283 "EHLO mail177-1.suw61.mandrillapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751145AbcCAXx0 (ORCPT ); Tue, 1 Mar 2016 18:53:26 -0500 From: Greg Kroah-Hartman Subject: [PATCH 3.14 088/130] Btrfs: fix number of transaction units required to create symlink X-Mailer: git-send-email 2.7.2 To: Cc: Greg Kroah-Hartman , , Filipe Manana Message-Id: <20160301234502.918093457@linuxfoundation.org> In-Reply-To: <20160301234459.768886030@linuxfoundation.org> References: <20160301234459.768886030@linuxfoundation.org> X-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com X-Report-Abuse: You can also report abuse here: http://mandrillapp.com/contact/abuse?id=30481620.84a52581733f44778f4975fa9c84e9e6 X-Mandrill-User: md_30481620 Date: Tue, 01 Mar 2016 23:53:24 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1066 Lines: 34 3.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Filipe Manana 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: Greg Kroah-Hartman --- fs/btrfs/inode.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -8625,9 +8625,11 @@ static int btrfs_symlink(struct inode *d /* * 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);