ext4: Fix the NULL reference in double_down_write_data_sem()
commitbff3bb48504169e26c55da6847322310e7a0b36e
authorAkira Fujita <a-fujita@rs.jp.nec.com>
Mon, 31 May 2010 02:49:36 +0000 (30 22:49 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 2 Aug 2010 17:21:15 +0000 (2 10:21 -0700)
tree33c62a31999c23941a5eed402d8d47179d47bb6b
parent68285a49fce5634e194be0de1aec6e423d74e1cc
ext4: Fix the NULL reference in double_down_write_data_sem()

commit 7247c0caa23d94a1cb6b307edba9dc45fb0798d4 upstream (as of v2.6.33-git11)

If EXT4_IOC_MOVE_EXT ioctl is called with NULL donor_fd, fget() in
ext4_ioctl() gets inappropriate file structure for donor; so we need
to do this check earlier, before calling double_down_write_data_sem().

Signed-off-by: Akira Fujita <a-fujita@rs.jp.nec.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ext4/move_extent.c