summaryrefslogtreecommitdiff
path: root/fs/btrfs/free-space-cache.c
diff options
context:
space:
mode:
authorMiao Xie <miaox@cn.fujitsu.com>2013-01-22 10:49:00 (GMT)
committerJosef Bacik <jbacik@fusionio.com>2013-01-24 17:51:27 (GMT)
commit1eafa6c73791e4f312324ddad9cbcaf6a1b6052b (patch)
tree59ffd2a324039af64354fbaaaa116c9366acba6f /fs/btrfs/free-space-cache.c
parentc9f01bfe0ca411b4751d7fdbb9d602035ba52f75 (diff)
downloadlinux-fsl-qoriq-1eafa6c73791e4f312324ddad9cbcaf6a1b6052b.tar.xz
Btrfs: fix repeated delalloc work allocation
btrfs_start_delalloc_inodes() locks the delalloc_inodes list, fetches the first inode, unlocks the list, triggers btrfs_alloc_delalloc_work/ btrfs_queue_worker for this inode, and then it locks the list, checks the head of the list again. But because we don't delete the first inode that it deals with before, it will fetch the same inode. As a result, this function allocates a huge amount of btrfs_delalloc_work structures, and OOM happens. Fix this problem by splice this delalloc list. Reported-by: Alex Lyakas <alex.btrfs@zadarastorage.com> Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/btrfs/free-space-cache.c')
0 files changed, 0 insertions, 0 deletions