android_kernel_samsung_msm8976/fs/exofs
Nick Piggin 97178b7b6c exofs: simple fsync race fix
It is incorrect to test inode dirty bits without participating in the inode
writeback protocol. Inode writeback sets I_SYNC and clears I_DIRTY_?, then
writes out the particular bits, then clears I_SYNC when it is done. BTW. it
may not completely write all pages out, so I_DIRTY_PAGES would get set
again.

This is a standard pattern used throughout the kernel's writeback caches
(I_SYNC ~= I_WRITEBACK, if that makes it clearer).

And so it is not possible to determine an inode's dirty status just by
checking I_DIRTY bits. Especially not for the purpose of data integrity
syncs.

Missing the check for these bits means that fsync can complete while
writeback to the inode is underway. Inode writeback functions get this
right, so call into them rather than try to shortcut things by testing
dirty state improperly.

Signed-off-by: Nick Piggin <npiggin@kernel.dk>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
2011-03-15 15:02:50 +02:00
..
BUGS exofs: Documentation 2009-03-31 19:44:38 +03:00
common.h exofs: Define on-disk per-inode optional layout attribute 2010-02-28 03:35:28 -08:00
dir.c exofs: Trivial: fix some indentation and debug prints 2011-03-15 15:00:27 +02:00
exofs.h convert exofs to ->evict_inode() 2010-08-09 16:48:24 -04:00
file.c exofs: simple fsync race fix 2011-03-15 15:02:50 +02:00
inode.c exofs: simple fsync race fix 2011-03-15 15:02:50 +02:00
ios.c fs/exofs: typo fix of faild to failed 2010-10-25 18:02:49 +02:00
Kbuild exofs: move osd.c to ios.c 2009-12-10 09:59:21 +02:00
Kconfig
namei.c exofs: i_nlink races in rename() 2011-03-03 01:28:17 -05:00
pnfs.h exofs: fix pnfs_osd re-definitions in pre-pnfs trees 2010-01-05 09:14:32 +02:00
super.c exofs: Remove redundant unlikely() 2011-03-15 12:33:42 +02:00
symlink.c exofs: Remove IBM copyrights 2009-06-21 17:53:47 +03:00