Chao Yu
47a8ddcdca
f2fs: fix return value of f2fs_convert_inline_inode()
commit a8eb3de28e7a365690c61161e7a07a4fc7c60bbf upstream.
If device is readonly, make f2fs_convert_inline_inode()
return EROFS instead of zero, otherwise it may trigger
panic during writeback of inline inode's dirty page as
below:
f2fs_write_single_data_page+0xbb6/0x1e90 fs/f2fs/data.c:2888
f2fs_write_cache_pages fs/f2fs/data.c:3187 [inline]
__f2fs_write_data_pages fs/f2fs/data.c:3342 [inline]
f2fs_write_data_pages+0x1efe/0x3a90 fs/f2fs/data.c:3369
do_writepages+0x359/0x870 mm/page-writeback.c:2634
filemap_fdatawrite_wbc+0x125/0x180 mm/filemap.c:397
__filemap_fdatawrite_range mm/filemap.c:430 [inline]
file_write_and_wait_range+0x1aa/0x290 mm/filemap.c:788
f2fs_do_sync_file+0x68a/0x1ae0 fs/f2fs/file.c:276
generic_write_sync include/linux/fs.h:2806 [inline]
f2fs_file_write_iter+0x7bd/0x24e0 fs/f2fs/file.c:4977
call_write_iter include/linux/fs.h:2114 [inline]
new_sync_write fs/read_write.c:497 [inline]
vfs_write+0xa72/0xc90 fs/read_write.c:590
ksys_write+0x1a0/0x2c0 fs/read_write.c:643
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Cc: stable@vger.kernel.org
Reported-by: syzbot+848062ba19c8782ca5c8@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/linux-f2fs-devel/000000000000d103ce06174d7ec3@google.com
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-03 08:49:38 +02:00
..
2024-06-16 13:41:37 +02:00
2023-02-01 08:34:08 +01:00
2024-06-16 13:41:31 +02:00
2023-09-23 11:10:59 +02:00
2022-08-02 12:34:03 -04:00
2024-07-27 11:32:19 +02:00
2024-07-25 09:49:21 +02:00
2024-03-15 10:48:13 -04:00
2023-03-10 09:33:52 +01:00
2022-12-31 13:32:22 +01:00
2023-03-10 09:34:09 +01:00
2023-05-11 23:03:00 +09:00
2024-01-20 11:50:04 +01:00
2024-02-16 19:06:29 +01:00
2024-06-12 11:03:04 +02:00
2024-03-06 14:45:11 +00:00
2024-07-25 09:49:18 +02:00
2023-11-28 17:07:00 +00:00
2024-03-06 14:45:15 +00:00
2024-08-03 08:49:32 +02:00
2024-08-03 08:49:34 +02:00
2024-08-03 08:49:38 +02:00
2024-04-03 15:19:27 +02:00
2022-08-02 12:34:03 -04:00
2024-07-25 09:49:20 +02:00
2024-08-03 08:49:31 +02:00
2024-07-05 09:32:00 +02:00
2024-08-03 08:49:32 +02:00
2024-08-03 08:48:53 +02:00
2022-09-19 22:46:25 +02:00
2024-05-17 11:55:51 +02:00
2024-07-25 09:49:12 +02:00
2024-04-13 13:05:06 +02:00
2024-08-03 08:49:35 +02:00
2024-07-11 12:47:09 +02:00
2024-07-27 11:32:18 +02:00
2024-08-03 08:48:54 +02:00
2024-03-06 14:45:16 +00:00
2022-09-24 07:00:00 +02:00
2023-10-06 14:56:32 +02:00
2024-08-03 08:49:16 +02:00
2024-06-21 14:35:55 +02:00
2024-08-03 08:49:28 +02:00
2023-09-13 09:42:22 +02:00
2023-07-19 16:22:05 +02:00
2022-10-12 11:00:22 -07:00
2024-08-03 08:49:37 +02:00
2024-07-27 11:32:18 +02:00
2024-06-12 11:03:03 +02:00
2024-07-11 12:47:08 +02:00
2024-06-12 11:03:39 +02:00
2024-08-03 08:49:28 +02:00
2024-04-13 13:04:57 +02:00
2022-09-11 21:55:07 -07:00
2024-03-26 18:20:47 -04:00
2023-07-19 16:22:11 +02:00
2023-09-13 09:42:27 +02:00
2024-08-03 08:49:33 +02:00
2023-02-22 12:59:50 +01:00
2024-04-27 17:07:16 +02:00
2024-04-13 13:05:05 +02:00
2023-09-23 11:11:12 +02:00
2024-04-03 15:19:27 +02:00
2024-08-03 08:49:34 +02:00
2022-09-11 20:26:07 -07:00
2024-04-10 16:28:25 +02:00
2023-09-13 09:43:03 +02:00
2024-05-25 16:21:34 +02:00
2024-02-23 09:12:45 +01:00
2024-04-03 15:19:42 +02:00
2022-08-20 11:34:04 -04:00
2023-09-23 11:11:10 +02:00
2022-09-24 07:00:00 +02:00
2023-10-06 14:57:06 +02:00
2023-07-01 13:16:25 +02:00
2022-12-31 13:32:57 +01:00
2022-10-12 11:00:22 -07:00
2022-12-31 13:32:41 +01:00
2023-02-22 12:59:50 +01:00
2022-08-20 11:34:33 -04:00
2022-09-24 18:14:12 -07:00
2024-07-25 09:49:18 +02:00
2022-09-20 08:24:38 -06:00
2023-09-13 09:42:27 +02:00
2024-06-12 11:03:03 +02:00
2024-04-03 15:19:48 +02:00
2024-03-26 18:20:28 -04:00
2024-03-26 18:20:27 -04:00
2022-08-16 10:59:54 -04:00
2024-07-25 09:49:12 +02:00
2023-09-13 09:42:28 +02:00
2023-01-07 11:11:59 +01:00
2023-11-20 11:51:50 +01:00
2024-01-10 17:10:32 +01:00
2023-08-30 16:11:10 +02:00
2024-01-31 16:17:00 -08:00
2023-06-28 11:12:40 +02:00
2022-10-10 14:21:11 -07:00
2022-12-31 13:31:58 +01:00
2024-07-27 11:32:19 +02:00
2023-06-28 11:12:40 +02:00
2023-01-07 11:12:02 +01:00
2022-08-03 10:35:43 -07:00
2024-01-31 16:17:02 -08:00
2024-02-23 09:12:46 +01:00
2022-08-20 11:34:04 -04:00
2024-07-05 09:31:59 +02:00
2024-04-10 16:28:30 +02:00
2023-01-04 11:29:01 +01:00
2022-10-10 17:53:04 -07:00
2023-02-09 11:28:04 +01:00
2022-08-17 17:25:04 -04:00
2022-08-05 16:32:45 -07:00
2024-03-26 18:20:28 -04:00
2023-02-09 11:28:04 +01:00
2024-01-10 17:10:31 +01:00
2022-09-11 19:47:12 -05:00
2023-05-24 17:32:51 +01:00
2023-08-11 12:08:24 +02:00
2024-07-18 13:18:41 +02:00
2022-12-31 13:31:55 +01:00