ext4: Fix the NULL reference in double_down_write_data_sem()
authorAkira Fujita <a-fujita@rs.jp.nec.com>
Thu, 4 Mar 2010 05:34:58 +0000 (00:34 -0500)
committerMatt Sealey <matt@genesi-usa.com>
Mon, 29 Nov 2010 23:07:25 +0000 (17:07 -0600)
commitf97ecea19c92dda234433ad30c5dadc913950544
treea6cdd857afac83e60ca07f3004de2b9c9d44b9c7
parent8bfd473e30a5846405cc2f3105bd330a43a7c522
ext4: Fix the NULL reference in double_down_write_data_sem()

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>
fs/ext4/move_extent.c