From 97d6b7b8fdeb455bae459dfaa408c12654583b95 Mon Sep 17 00:00:00 2001 From: Josef Bacik Date: Tue, 11 Oct 2011 14:18:24 -0400 Subject: [PATCH] --- yaml --- r: 274646 b: refs/heads/master c: e70bea5fe0e3d6355fd95674eaff5aa5a32f0564 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/btrfs/inode.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 29ce1b90f979..d20637bbc35c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4b91c14f913f649d4302b3677b85c4ce87a3d8e7 +refs/heads/master: e70bea5fe0e3d6355fd95674eaff5aa5a32f0564 diff --git a/trunk/fs/btrfs/inode.c b/trunk/fs/btrfs/inode.c index 246397d8478f..1f013c5c36aa 100644 --- a/trunk/fs/btrfs/inode.c +++ b/trunk/fs/btrfs/inode.c @@ -2758,7 +2758,16 @@ static struct btrfs_trans_handle *__unlink_start_trans(struct inode *dir, u64 ino = btrfs_ino(inode); u64 dir_ino = btrfs_ino(dir); - trans = btrfs_start_transaction(root, 10); + /* + * 1 for the possible orphan item + * 1 for the dir item + * 1 for the dir index + * 1 for the inode ref + * 1 for the inode ref in the tree log + * 2 for the dir entries in the log + * 1 for the inode + */ + trans = btrfs_start_transaction(root, 8); if (!IS_ERR(trans) || PTR_ERR(trans) != -ENOSPC) return trans;