]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext4: Restore wbc->range_start in ext4_da_writepages()
authorTheodore Ts'o <tytso@mit.edu>
Mon, 31 Aug 2009 21:00:59 +0000 (17:00 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 14 Dec 2009 16:06:19 +0000 (08:06 -0800)
commit63762a2387882e4ff8ae77133b331abef8e6f555
treee0e1d09a2c9bfaa070b78375e3064baba0ca4f1f
parente4670b394dd5cdfc5fda17e3ec94c444dcaecac2
ext4: Restore wbc->range_start in ext4_da_writepages()

(cherry picked from commit de89de6e0cf4b1eb13f27137cf2aa40d287aabdf)

To solve a lock inversion problem, we implement part of the
range_cyclic algorithm in ext4_da_writepages().  (See commit 2acf2c26
for more details.)

As part of that change wbc->range_start was modified by ext4's
writepages function, which causes its callers to get confused since
they aren't expecting the filesystem to modify it.  The simplest fix
is to save and restore wbc->range_start in ext4_da_writepages.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/inode.c