From patchwork Mon Apr 9 10:55:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 133023 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp129936ljb; Mon, 9 Apr 2018 03:56:21 -0700 (PDT) X-Google-Smtp-Source: AIpwx49iOYVAIH6CqRQzIpuYQpzw5HIGEDQ8ixx9zL+zqhubm9H8ToAWSt9Wbix9EfRjWNJD3aUp X-Received: by 10.98.59.139 with SMTP id w11mr28591155pfj.96.1523271381424; Mon, 09 Apr 2018 03:56:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523271381; cv=none; d=google.com; s=arc-20160816; b=qBrrVXbkkwp3m9GIcC2ioryaNSqPX+TBkI80kDoPt8N05ybPfLPQhGG+0EpyGi23H2 JhpxokLbKfiW0NL1jn/OFwn0J0nRmYPtxgE/4LtLYGyJf4HtHXXFMKgfxY+5kxQLL2yQ YA265lDNr4xWKyBEF0dG+TyW7N24n2/ZnBg+R9a1h4P0SrZtxL4gMGON0qG8/FR3HPIe Mzlc7NJW7MbaupOfV7qA6M3mRST5puLY00fQwCPVPvPuNCaoxFxXjqZnMtHpR5vWgA56 NL4EkQiz1aDoVwh+nJCykifzM1sLeuIX4UrEaxycA4qdQFt2bJS712Q1ELogpCQb5KxC D/KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=UJ3/CeDpK8AqEoagzZnR8Vis1+7/AktpBBm3T3iLqJU=; b=tUIfcn6Xi9eaRsHAJsj4vVPwbZ+ayaquSf4P9L4AKIyMlWourecQduZPN9eKRZhExj 0fOdcaVLscCPFeRXk1pOhAm7wZf5jmtIE21M+IImhsdInzKJXeiNTAjWh60xNgk6nrg7 ET31PO482vpab8EtW5p515+sCnHscAZR45mpQUas7hlQuiT4B7FO9SbObjkkGiwtWOaQ 9qrc109fgE95Azk0lFuSBX8ek7aEBUEyagkMnma/njN57oFeIojYNTorX5/GBShNLSBj W438JzIpHkRS4+i1MkIiURRiBdT+Lk5pvTnCltI1NHUP1o/3ZcxtIHyBmGxxpccVkdO+ 8rbw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 66-v6si76667pld.315.2018.04.09.03.56.21; Mon, 09 Apr 2018 03:56:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751998AbeDIK4R (ORCPT + 29 others); Mon, 9 Apr 2018 06:56:17 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:49919 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750877AbeDIK4Q (ORCPT ); Mon, 9 Apr 2018 06:56:16 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0MI6Qg-1f3qIj1S2g-003rH2; Mon, 09 Apr 2018 12:55:59 +0200 From: Arnd Bergmann To: Jan Kara , Andrew Morton , Jeff Layton Cc: Arnd Bergmann , Martin Brandenburg , Mike Marshall , Mel Gorman , Al Viro , Goldwyn Rodrigues , Matthew Wilcox , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm: filemap: provide dummy filemap_page_mkwrite() for NOMMU Date: Mon, 9 Apr 2018 12:55:42 +0200 Message-Id: <20180409105555.2439976-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:EE+VmxhzKgdjnpRie/TEj6xGj9g/nXlmPg4Cj+fvdxnPjQQrXjq 89s8+LQpDk8+811FGozGNAA4OZmGmFFbpBRrxABMXWD/GYTOnS6WWJzLBH7A+iOUGYAwK5S sPzI+2OEs0CgHgBg7NH563zdJNbNv8pDID0PItXKmS2AxMFaZoHrvmZwW3czHDyaZAi57Sj dVGKjTNjGghkVTAqn5iWw== X-UI-Out-Filterresults: notjunk:1; V01:K0:dDIBhw359d0=:8X4yPQ7mEBpenIUFFyczLb s/CSJYKglFROCVCReeGDtbXQgEL9sVXySikso3wtNX6grO+il+nEkvq6zLfTtE7yJghpAXhmG Njma9kLLjkd1pL0jnuGb6Yxq3Bob8IKxigUHR0K1BB9duyFPuTMDR+eYX9iVJiPaHRpWGBqWE SZk+BYppXjQKe+7gdL+URBsoLrvsOWjEalW1uuPc3ro5joUWY2nUYqveARcbtvQKRXIUeoZaf 7S3HlM8PeCl155ZQ3qICcl6eH7eCRtwQwagUYIG03g0/ChKfbxpFWZ2uAqGTCNWBfW953EhmR CYr3wfilDB7TmRKz3ZKbZAJZ3opb1cEXorXRHeMkoJAXHy1THPwZ+Wxg09g4Gm2DPAQ5QJebv amNw4PUv+nO6T+YYAv3D97TtLm46vdTcKSzu1zVFzGFp+ZRPOK6Y7M4kF/1pnsbIO3NIxm6iK 1s3FDJheOMyuVg7ZGWm1bq2FfST2MjdvTlHkrruvGNNIOZA+tPSdWF4mUzHN1eayFRt8787hM 7zv0lozKcNuEmP6wrTg+RLB3apFDuNhSTG/rhZBsiJarFTyBb7XoCsJ6a0aBNF7ahnEtg0gkR u3/Q/iRznt7uftKXaRJOJrhURGGWO2T0lWunUPMSG3dRXaMyAnBqlH8v8kLSglcN/SN92hxBS xGRl37ukGh9ukLtS1N6ZraWoDny4QTjWCKsiLytxeTTMknhhzef7fMdcfaVMK4R5hFgwUqiou diL2h/q3DNy5aeLN0txBcjCrK6oaEBSJCPbSaQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Building orangefs on MMU-less machines now results in a link error because of the newly introduced use of the filemap_page_mkwrite() function: ERROR: "filemap_page_mkwrite" [fs/orangefs/orangefs.ko] undefined! This adds a dummy version for it, similar to the existing generic_file_mmap and generic_file_readonly_mmap stubs in the same file, to avoid the link error without adding #ifdefs in each file system that uses these. Cc: Martin Brandenburg Cc: Mike Marshall Fixes: a5135eeab2e5 ("orangefs: implement vm_ops->fault") Signed-off-by: Arnd Bergmann --- mm/filemap.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- 2.9.0 Reviewed-by: Jan Kara diff --git a/mm/filemap.c b/mm/filemap.c index ab77e19ab09c..9276bdb2343c 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -2719,7 +2719,6 @@ int filemap_page_mkwrite(struct vm_fault *vmf) sb_end_pagefault(inode->i_sb); return ret; } -EXPORT_SYMBOL(filemap_page_mkwrite); const struct vm_operations_struct generic_file_vm_ops = { .fault = filemap_fault, @@ -2750,6 +2749,10 @@ int generic_file_readonly_mmap(struct file *file, struct vm_area_struct *vma) return generic_file_mmap(file, vma); } #else +int filemap_page_mkwrite(struct vm_fault *vmf) +{ + return -ENOSYS; +} int generic_file_mmap(struct file * file, struct vm_area_struct * vma) { return -ENOSYS; @@ -2760,6 +2763,7 @@ int generic_file_readonly_mmap(struct file * file, struct vm_area_struct * vma) } #endif /* CONFIG_MMU */ +EXPORT_SYMBOL(filemap_page_mkwrite); EXPORT_SYMBOL(generic_file_mmap); EXPORT_SYMBOL(generic_file_readonly_mmap);