]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix possible empty list access when flushing the delalloc inodes
authorMiao Xie <miaox@cn.fujitsu.com>
Thu, 6 Mar 2014 05:55:03 +0000 (13:55 +0800)
committerJosef Bacik <jbacik@fb.com>
Mon, 10 Mar 2014 19:17:29 +0000 (15:17 -0400)
commit546cbed96271ddd540c7b996d66585899349dcc4
tree5434c2e82299cf22af4470fef31d3890d209a0b9
parent52459972f0a2e8d4477c54ad3052b1be4b48c8b3
Btrfs: fix possible empty list access when flushing the delalloc inodes

We didn't have a lock to protect the access to the delalloc inodes list, that is
we might access a empty delalloc inodes list if someone start flushing delalloc
inodes because the delalloc inodes were moved into a other list temporarily.
Fix it by wrapping the access with a lock.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fb.com>
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/inode.c