aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2012-06-15 14:19:48 -0400
committerChris Mason <chris.mason@fusionio.com>2012-06-21 07:19:36 -0400
commitcb77fcd88569cd2b7b25ecd4086ea932a53be9b3 (patch)
tree331330ac068ce4028e8d97bb47388ca67cf7430b /fs/btrfs/inode.c
parente18fca734278784bd6591de63ca148cc27344ca9 (diff)
Btrfs: delay iput with async extents
There is some concern that these iput()'s could be the final iputs and could induce lockups on people waiting on writeback. This would happen in the rare case that we don't create ordered extents because of an error, but it is theoretically possible and we already have a mechanism to deal with this so just make them delayed iputs to negate any worry. Signed-off-by: Josef Bacik <josef@redhat.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 3f2c8cbe5ba6..4a4f2d59a64b 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -987,7 +987,7 @@ static noinline void async_cow_start(struct btrfs_work *work)
987 async_cow->start, async_cow->end, async_cow, 987 async_cow->start, async_cow->end, async_cow,
988 &num_added); 988 &num_added);
989 if (num_added == 0) { 989 if (num_added == 0) {
990 iput(async_cow->inode); 990 btrfs_add_delayed_iput(async_cow->inode);
991 async_cow->inode = NULL; 991 async_cow->inode = NULL;
992 } 992 }
993} 993}
@@ -1023,7 +1023,7 @@ static noinline void async_cow_free(struct btrfs_work *work)
1023 struct async_cow *async_cow; 1023 struct async_cow *async_cow;
1024 async_cow = container_of(work, struct async_cow, work); 1024 async_cow = container_of(work, struct async_cow, work);
1025 if (async_cow->inode) 1025 if (async_cow->inode)
1026 iput(async_cow->inode); 1026 btrfs_add_delayed_iput(async_cow->inode);
1027 kfree(async_cow); 1027 kfree(async_cow);
1028} 1028}
1029 1029