diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 7136f99473549005486601667f2c56dee94d1979..6f4678d98df73f5edbddb7fe061a8593c3598194 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -1655,7 +1655,7 @@ static vm_fault_t ceph_page_mkwrite(struct vm_fault *vmf) do { lock_page(page); - if ((off > size) || (page->mapping != inode->i_mapping)) { + if (page_mkwrite_check_truncate(page, inode) < 0) { unlock_page(page); ret = VM_FAULT_NOPAGE; break;