Btrfs: Fix oops for defrag with compression turned on
authorLi Zefan <lizf@cn.fujitsu.com>
Mon, 28 Mar 2011 08:30:38 +0000 (08:30 +0000)
committerChris Mason <chris.mason@oracle.com>
Tue, 5 Apr 2011 05:19:42 +0000 (01:19 -0400)
commitfe3f566cd19bb6d787c92b2e202c85f929abf3ac
tree216c33bb0ed94e7791141939ea763620576d82b0
parent200da64e0b039f873f0f20481e6a7d056e7cc6c9
Btrfs: Fix oops for defrag with compression turned on

When we defrag a file, whose size can be fit into an inline extent,
with compression enabled, the compress type is set to be
fs_info->compress_type, which is 0 if the btrfs filesystem is mounted
without compress option. This leads to oops.

Reported-by: Daniel Blueman <daniel.blueman@gmail.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/inode.c