]> git.hungrycats.org Git - linux/commit
[PATCH] Fix reiserfs inode size update race
authorChris Mason <mason@suse.com>
Wed, 19 May 2004 00:18:07 +0000 (17:18 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 19 May 2004 00:18:07 +0000 (17:18 -0700)
commit77124e4ca8beabd786f7768a64b850c04e9892ef
treeb3876d902ebf8e96f142451bbbcc4859020baef7
parent4b3b8ee5db374b76608537e061f2efd90e21179d
[PATCH] Fix reiserfs inode size update race

reiserfs_file_write unlocks the pages it operated on before updating
i_size.  This can lead to races with writepage, who checks i_size when
deciding how much of the file to zero out.

This patch also replaces SetPageReferenced with mark_page_accessed() in
reiserfs_file_write

This was verified to fix the BitKeeper data corruption problems that
Steven Cole has been debugging, where concurrent writes to a file and
writebacks to disk would cause zeroes in the file when CONFIG_PREEMPT
was enabled.
fs/reiserfs/file.c