]> git.hungrycats.org Git - linux/commit
ext4: skip conversion of uninit extents after direct IO if there isn't any
authorMingming <cmm@us.ibm.com>
Tue, 10 Nov 2009 15:48:04 +0000 (10:48 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 14 Dec 2009 16:07:17 +0000 (08:07 -0800)
commit3e6c8d3881736079664aad465e26486d1d4152b9
treec477624f86fb665541bda11ba260abecddbd6f22
parent3e270fa58d81a994d1e4371be444f2e5bb072866
ext4: skip conversion of uninit extents after direct IO if there isn't any

(cherry picked from commit 5f5249507e4b5c4fc0f9c93f33d133d8c95f47e1)

At the end of direct I/O operation, ext4_ext_direct_IO() always called
ext4_convert_unwritten_extents(), regardless of whether there were any
unwritten extents involved in the I/O or not.

This commit adds a state flag so that ext4_ext_direct_IO() only calls
ext4_convert_unwritten_extents() when necessary.

Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ext4/ext4.h
fs/ext4/extents.c
fs/ext4/inode.c