Commits
Vladimir Davydov authored and Konstantin Khorenko committed 504dd3e7391
ve/xfs: add missing ub_io_account_dirty in set_page_dirty To account dirty pages to beancounter, we call ub_io_account_dirty from __set_page_dirty_nobuffers and __set_page_dirty, on top of which all helpers for marking a page as dirty are built. There is one exception though - xfs_vm_set_page_dirty does not use any of these. It would use __set_page_dirty if it was not static, but since it is, it simply copies it. That said, we need to call ub_io_account_dirty from this function either, otherwise a warning will be issued: WARNING: at kernel/bc/io_acct.c:80 ub_io_account_cancel+0x11a/0x130() Call Trace: [<ffffffff815fd64f>] dump_stack+0x19/0x1b [<ffffffff8106e59b>] warn_slowpath_common+0x6b/0xb0 [<ffffffff8106e6ea>] warn_slowpath_null+0x1a/0x20 [<ffffffff810de49a>] ub_io_account_cancel+0x11a/0x130 [<ffffffff81168f78>] __delete_from_page_cache+0x2f8/0x350 [<ffffffff8116900e>] delete_from_page_cache+0x3e/0xa0 [<ffffffff8117772b>] truncate_inode_page+0x5b/0x80 [<ffffffff81177986>] truncate_inode_pages_range+0x1f6/0x740 [<ffffffff811c028b>] ? kmem_cache_free+0xab/0x1e0 [<ffffffffa0115ffe>] ? xfs_trans_free+0x6e/0x80 [xfs] [<ffffffffa0117276>] ? xfs_trans_commit+0x146/0x240 [xfs] [<ffffffffa01494a6>] ? xfs_inode_is_filestream+0x46/0x70 [xfs] [<ffffffffa014c94a>] ? xfs_remove+0x36a/0x380 [xfs] [<ffffffff81209420>] ? __inode_wait_for_writeback+0x80/0xf0 [<ffffffff81177f4e>] truncate_inode_pages_final+0x5e/0x90 [<ffffffffa01130b9>] xfs_fs_evict_inode+0x29/0xc0 [xfs] [<ffffffff811faf47>] evict+0xa7/0x170 [<ffffffff811fb82b>] iput+0x18b/0x1f0 [<ffffffff811efbbe>] do_unlinkat+0x1ae/0x2b0 [<ffffffff81608dda>] ? do_page_fault+0x1a/0x70 [<ffffffff811f0cd6>] SyS_unlink+0x16/0x20 [<ffffffff8160d589>] system_call_fastpath+0x16/0x1b Since we do not officially support XFS, it is not critical for us, nevertheless let us fix it in case anybody tries to use it. Reported-by: Alexey Lyashkov <umka@cloudlinux.com> Signed-off-by: Vladimir Davydov <vdavydov@virtuozzo.com>