Files
twx-linux/include/linux
Chao Yu 060986096f quota: fix wrong condition in is_quota_modification()
commit 6565c18209 upstream.

Quoted from
commit 3da40c7b08 ("ext4: only call ext4_truncate when size <= isize")

" At LSF we decided that if we truncate up from isize we shouldn't trim
  fallocated blocks that were fallocated with KEEP_SIZE and are past the
 new i_size.  This patch fixes ext4 to do this. "

And generic/092 of fstest have covered this case for long time, however
is_quota_modification() didn't adjust based on that rule, so that in
below condition, we will lose to quota block change:
- fallocate blocks beyond EOF
- remount
- truncate(file_path, file_size)

Fix it.

Link: https://lore.kernel.org/r/20190911093650.35329-1-yuchao0@huawei.com
Fixes: 3da40c7b08 ("ext4: only call ext4_truncate when size <= isize")
CC: stable@vger.kernel.org
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-05 13:10:11 +02:00
..
2018-05-26 09:16:44 +02:00
2012-10-08 13:50:20 +10:30
2018-06-15 18:10:01 -03:00
2019-04-20 09:16:05 +02:00
2011-03-11 14:25:50 +00:00
2019-10-05 13:10:03 +02:00
2019-07-03 13:14:48 +02:00
2018-05-09 17:25:13 +02:00
2018-06-15 18:10:01 -03:00
2018-06-19 10:06:29 -07:00
2018-08-22 10:52:48 -07:00
2019-08-09 17:52:28 +02:00
2017-08-24 13:23:03 -07:00
2012-02-20 19:46:36 +11:00
2018-01-01 12:40:27 -07:00
2018-07-24 19:11:26 +02:00
2017-08-07 17:22:14 +02:00
2014-12-31 13:06:50 -05:00
2018-07-12 10:04:29 -04:00
2014-10-09 11:35:48 +03:00
2017-11-13 01:41:20 +01:00
2018-07-27 09:57:23 +10:00
2019-05-31 06:46:18 -07:00
2018-06-28 20:32:51 +09:00
2018-03-26 08:53:43 -06:00
2018-06-22 13:43:27 +09:00
2014-03-13 12:11:00 +10:30
2018-04-11 10:28:38 -07:00
2015-07-28 08:50:42 +01:00
2018-07-12 21:35:28 +02:00
2017-12-01 13:09:40 -08:00
2018-04-12 09:41:19 -07:00
2017-08-28 20:51:22 +02:00
2018-06-05 08:50:16 -04:00
2018-06-07 17:34:35 -07:00
2018-04-11 10:28:32 -07:00
2019-05-04 09:20:11 +02:00
2018-06-07 17:34:39 -07:00
2018-03-26 13:14:43 -04:00
2018-01-28 22:17:24 -05:00
2018-01-31 17:18:37 -08:00
2017-11-09 10:23:28 +01:00
2018-07-25 13:41:22 -07:00
2017-11-17 16:10:04 -08:00
2018-07-21 10:43:12 -05:00
2017-12-16 02:05:48 +01:00
2018-08-22 10:52:46 -07:00
2019-06-11 12:20:52 +02:00
2018-07-20 01:11:45 +02:00
2018-08-02 17:33:06 -04:00
2018-08-02 17:16:05 +02:00
2018-06-29 08:48:06 -06:00
2018-07-07 17:25:23 +02:00
2018-05-03 15:55:23 -07:00
2018-08-16 12:14:42 -07:00
2018-01-15 12:07:46 -08:00
2019-04-17 08:38:45 +02:00
2013-04-30 15:50:12 +05:30
2018-02-06 18:32:47 -08:00
2018-11-13 11:08:51 -08:00
2019-06-17 19:51:56 +02:00
2018-02-06 18:32:44 -08:00
2017-12-20 09:53:54 -07:00
2018-05-14 09:51:34 -04:00
2017-08-15 09:02:07 -07:00
2011-01-13 08:03:24 -08:00
2017-08-15 09:02:08 -07:00