================================================================== BUG: KCSAN: data-race in ext4_has_free_clusters / percpu_counter_add_batch read to 0xffff888218630958 of 8 bytes by task 7549 on cpu 0: ext4_has_free_clusters+0x61/0x320 fs/ext4/balloc.c:555 ext4_claim_free_clusters+0x2e/0x90 fs/ext4/balloc.c:598 ext4_da_reserve_space+0x102/0x280 fs/ext4/inode.c:1602 ext4_insert_delayed_block fs/ext4/inode.c:1813 [inline] ext4_da_map_blocks fs/ext4/inode.c:1928 [inline] ext4_da_get_block_prep+0x87d/0xa60 fs/ext4/inode.c:1992 ext4_block_write_begin+0x33e/0xb90 fs/ext4/inode.c:1202 ext4_da_write_begin+0x1da/0x7e0 fs/ext4/inode.c:3122 generic_perform_write+0x136/0x320 mm/filemap.c:3327 __generic_file_write_iter+0x251/0x380 mm/filemap.c:3456 ext4_file_write_iter+0x1fc/0xa40 fs/ext4/file.c:270 call_write_iter include/linux/fs.h:1870 [inline] aio_write+0x1de/0x2d0 fs/aio.c:1583 __io_submit_one fs/aio.c:1815 [inline] io_submit_one+0x639/0xe70 fs/aio.c:1862 __do_sys_io_submit fs/aio.c:1921 [inline] __se_sys_io_submit fs/aio.c:1891 [inline] __x64_sys_io_submit+0x104/0x2d0 fs/aio.c:1891 do_syscall_64+0xcf/0x2f0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x44/0xa9 write to 0xffff888218630958 of 8 bytes by task 2549 on cpu 1: percpu_counter_add_batch+0xca/0x150 lib/percpu_counter.c:91 percpu_counter_add include/linux/percpu_counter.h:55 [inline] percpu_counter_sub include/linux/percpu_counter.h:189 [inline] ext4_da_update_reserve_space+0xf6/0x3b0 fs/ext4/inode.c:372 ext4_ext_map_blocks+0x1e57/0x2330 fs/ext4/extents.c:4474 ext4_map_blocks+0x244/0xf70 fs/ext4/inode.c:640 mpage_map_one_extent fs/ext4/inode.c:2496 [inline] mpage_map_and_submit_extent fs/ext4/inode.c:2545 [inline] ext4_writepages+0x1392/0x22e0 fs/ext4/inode.c:2897 do_writepages+0x6b/0x170 mm/page-writeback.c:2342 __writeback_single_inode+0xaf/0x8d0 fs/fs-writeback.c:1364 writeback_sb_inodes+0x4ba/0xa50 fs/fs-writeback.c:1628 __writeback_inodes_wb+0xe8/0x1b0 fs/fs-writeback.c:1697 wb_writeback+0x557/0x6a0 fs/fs-writeback.c:1806 wb_check_background_flush fs/fs-writeback.c:1874 [inline] wb_do_writeback fs/fs-writeback.c:1962 [inline] wb_workfn+0x697/0x950 fs/fs-writeback.c:1990 process_one_work+0x3d4/0x890 kernel/workqueue.c:2269 worker_thread+0xa0/0x800 kernel/workqueue.c:2415 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 2549 Comm: kworker/u4:3 Not tainted 5.3.0+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: writeback wb_workfn (flush-8:0) ==================================================================