Al Viro d311d79de3 fix O_SYNC|O_APPEND syncing the wrong range on write()
It actually goes back to 2004 ([PATCH] Concurrent O_SYNC write support)
when sync_page_range() had been introduced; generic_file_write{,v}() correctly
synced
	pos_after_write - written .. pos_after_write - 1
but generic_file_aio_write() synced
	pos_before_write .. pos_before_write + written - 1
instead.  Which is not the same thing with O_APPEND, obviously.
A couple of years later correct variant had been killed off when
everything switched to use of generic_file_aio_write().

All users of generic_file_aio_write() are affected, and the same bug
has been copied into other instances of ->aio_write().

The fix is trivial; the only subtle point is that generic_write_sync()
ought to be inlined to avoid calculations useless for the majority of
calls.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-02-09 15:18:09 -05:00
..
2013-05-07 18:45:36 -05:00
2013-11-06 16:31:27 -06:00
2013-11-06 16:31:27 -06:00
2013-05-07 18:45:36 -05:00
2011-08-12 16:21:35 -05:00
2011-08-12 16:21:35 -05:00
2012-11-19 20:11:24 -06:00
2013-08-12 16:53:39 -05:00
2012-11-19 20:11:24 -06:00
2011-08-12 16:21:35 -05:00
2011-03-07 10:09:35 +11:00
2011-08-12 16:21:35 -05:00
2013-09-12 16:13:41 -07:00
2013-12-18 15:48:44 -06:00
2012-05-14 16:20:54 -05:00
2011-08-12 16:21:35 -05:00
2013-08-12 16:56:06 -05:00
2013-11-06 12:41:51 -06:00
2013-05-07 18:45:36 -05:00
2013-11-14 17:16:35 +09:00
2012-10-17 12:01:25 -05:00
2013-11-06 12:41:51 -06:00
2013-12-17 09:28:43 -06:00
2013-12-04 14:11:05 -06:00
2013-05-07 18:45:36 -05:00