]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: return error when we specify wrong start to defrag
authorLiu Bo <bo.li.liu@oracle.com>
Tue, 16 Apr 2013 09:20:28 +0000 (09:20 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Mon, 6 May 2013 19:54:55 +0000 (15:54 -0400)
commit10e572847951041b9bba885a61f79f6c488540ce
tree26b1399cc7b83ddabd2427d283a5a39a1dd878c5
parent9e528d7671f6feadb517b85f22f6b41bf9b04d56
Btrfs: return error when we specify wrong start to defrag

We need such a sanity check for wrong start when we defrag a file, otherwise,
even with a wrong start that's larger than file size, we can end up changing
not only inode's force compress flag but also FS's incompat flags.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/ioctl.c