]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix possible stale data exposure
authorJosef Bacik <jbacik@fusionio.com>
Wed, 30 Jan 2013 19:31:31 +0000 (14:31 -0500)
committerJosef Bacik <jbacik@fusionio.com>
Tue, 5 Feb 2013 21:09:16 +0000 (16:09 -0500)
commit14cd306ded66e2ff20da09b119a682f3187a0aea
tree8d85984a12d0a821a402f83558e82561485be65b
parent1a6c576f5add04a4d758e472791d752a3af15805
Btrfs: fix possible stale data exposure

We specifically do not update the disk i_size if there are ordered extents
outstanding for any area between the current disk_i_size and our ordered
extent so that we do not expose stale data.  The problem is the check we
have only checks if the ordered extent starts at or after the current
disk_i_size, which doesn't take into account an ordered extent that starts
before the current disk_i_size and ends past the disk_i_size.  Fix this by
checking if the extent ends past the disk_i_size.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/ordered-data.c