From: Zheng Liu Date: Mon, 23 Jul 2012 00:19:31 +0000 (-0400) Subject: ext4: don't take the i_mutex lock when doing DIO overwrites X-Git-Tag: v3.6-rc1~69^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bd809dbbf177ad0c450d702466b1da63e1b4b7e;p=pandora-kernel.git ext4: don't take the i_mutex lock when doing DIO overwrites Aligned and overwrite direct I/O can be parallelized. In ext4_file_dio_write, we first check whether these conditions are satisfied or not. If so, we take i_data_sem and release i_mutex lock directly. Meanwhile iocb->private is set to indicate that this is a dio overwrite, and it will be handled in ext4_ext_direct_IO. [ Added fix from Dan Carpenter to fix locking bug on the error path. ] CC: Tao Ma CC: Eric Sandeen CC: Robin Dong Signed-off-by: Zheng Liu Signed-off-by: "Theodore Ts'o" Signed-off-by: Dan Carpenter --- Reading git-diff-tree failed