]> git.baikalelectronics.ru Git - kernel.git/commit
device-dax: Add missing address_space_operations
authorDave Jiang <dave.jiang@intel.com>
Mon, 10 Sep 2018 23:18:29 +0000 (16:18 -0700)
committerDan Williams <dan.j.williams@intel.com>
Sat, 22 Sep 2018 16:07:33 +0000 (09:07 -0700)
commit1bc7e12f99357b4d5d6f63dc9329237368a0be02
treebdf124b40cb35fd03b974f2f234ce4b246338281
parent5157155235b9875f65100fea2e3c0f16ce530547
device-dax: Add missing address_space_operations

With address_space_operations missing for device dax, namely the
.set_page_dirty, we hit a kernel warning when running destructive
ndctl unit test: make TESTS=device-dax check

WARNING: CPU: 3 PID: 7380 at fs/buffer.c:581 __set_page_dirty+0xb1/0xc0

Setting address_space_operations to noop_set_page_dirty and
noop_invalidatepage for device dax to prevent fallback to
__set_page_dirty_buffers() and block_invalidatepage() respectively.

Fixes: cc2493ae2f ("device-dax: Enable page_mapping()")
Acked-by: Jeff Moyer <jmoyer@redhat.com>
Reported-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/dax/device.c