Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933088AbbGUPa5 (ORCPT ); Tue, 21 Jul 2015 11:30:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57732 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932257AbbGUPaz (ORCPT ); Tue, 21 Jul 2015 11:30:55 -0400 Date: Tue, 21 Jul 2015 17:29:03 +0200 From: Oleg Nesterov To: Andrew Morton Cc: Joonsoo Kim , Benjamin LaHaise , Fengguang Wu , Jeff Moyer , Johannes Weiner , Stephen Rothwell , linux-next@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] mm-move-mremap-from-file_operations-to-vm_operations_struct-fix Message-ID: <20150721152903.GA10180@redhat.com> References: <20150716231405.GA25147@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150716231405.GA25147@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1317 Lines: 46 Andrew, this replaces mm-move-mremap-from-file_operations-to-vm_operations_struct-fix.patch in -mm tree nacked by Benjamin. fs/aio.c can't be compiled if CONFIG_MMU=n, filemap_page_mkwrite() is not defined in this case. Add ifdef(CONFIG_MMU) into aio_ring_vm_ops. Note that this only fixes the build error, currently aio doesn't work if !CONFIG_MMU anyway. Reported-by: Fengguang Wu Reported-by: Stephen Rothwell Signed-off-by: Oleg Nesterov --- fs/aio.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index c122624..822c199 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -338,9 +338,11 @@ static int aio_ring_mremap(struct vm_area_struct *vma) static const struct vm_operations_struct aio_ring_vm_ops = { .mremap = aio_ring_mremap, +#ifdef CONFIG_MMU .fault = filemap_fault, .map_pages = filemap_map_pages, .page_mkwrite = filemap_page_mkwrite, +#endif }; static int aio_ring_mmap(struct file *file, struct vm_area_struct *vma) -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/