{"shas":[["4711ed2c10edc0832b1b5510bca0da124544d2ad","eb12b37ff28da18665a37098cde5fce7621b4bcd@losinj.com","fs: mark_inode_dirty barrier fix\n\n    Filesystems appear to be using ->dirty_inode, expecting that the dirtying\n    operating is done and visible to all CPUs (eg. setting private inode dirty\n    bits, without any barriers themselves). So release the dirty \"critical\n    section\" with a barrier before calling ->dirty_inode.\n\n    Cost is not significantly changed, because we're just moving the barrier.\n    Those filesystems that do use ->dirty_inode should have to care slightly\n    less about barriers, which is a good thing.\n\n    Signed-off-by: Nick Piggin <npiggin@kernel.dk>","LorD ClockaN"],["cdff9b24b596f0a4bdf6061b112c34d2bf744798","eb12b37ff28da18665a37098cde5fce7621b4bcd@losinj.com","fs: simple fsync race fix\n\n    It is incorrect to test inode dirty bits without participating in the inode\n    writeback protocol. Inode writeback sets I_SYNC and clears I_DIRTY_?, then\n    writes out the particular bits, then clears I_SYNC when it is done. BTW. it\n    may not completely write all pages out, so I_DIRTY_PAGES would get set\n    again.\n\n    This is a standard pattern used throughout the kernel's writeback caches\n    (I_SYNC ~= I_WRITEBACK, if that makes it clearer).\n\n    And so it is not possible to determine an inode's dirty status just by\n    checking I_DIRTY bits. Especially not for the purpose of data integrity\n    syncs.\n\n    Missing the check for these bits means that fsync can complete while\n    writeback to the inode is underway. Inode writeback functions get this\n    right, so call into them rather than try to shortcut things by testing\n    dirty state improperly.\n\n    Signed-off-by: Nick Piggin <npiggin@kernel.dk>","LorD ClockaN"]],"ref":"refs/heads/2.6.35-BFS","size":2,"head":"cdff9b24b596f0a4bdf6061b112c34d2bf744798","push_id":34544218}