From patchwork Thu Feb 13 15:20:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 231309 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07F2BC3B18C for ; Thu, 13 Feb 2020 16:02:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CA0B421734 for ; Thu, 13 Feb 2020 16:02:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581609760; bh=FxYiCaXQskh90KrwG3iV7GTqM8cjabD5+J+amsqs1UY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=VETRInVEql/eAYRDZIObzzJczYDZ7cu0xq0fGJOY2nO92uRQmXXyjE6SN1Cvypr12 J0o7Sj0oNwuMULwC1wTQqjpTTpDcuSy7opORajfirA6oUlEVXxVI3w9lBXJEJlfQPC efPN5+F8+GSxGn35W3nVQjGCTU/eGaTIgAHtYErE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728328AbgBMPY1 (ORCPT ); Thu, 13 Feb 2020 10:24:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:37896 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728693AbgBMPY0 (ORCPT ); Thu, 13 Feb 2020 10:24:26 -0500 Received: from localhost (unknown [104.132.1.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DF26824689; Thu, 13 Feb 2020 15:24:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581607466; bh=FxYiCaXQskh90KrwG3iV7GTqM8cjabD5+J+amsqs1UY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=POH54u7Vr79CHJl7fGsj9PiBOiU9VnNHlV4XCWj74sCtITXqGfCpT2LEULk8fu01y EH/EIj5crObIh5NL+z5pa5Ksls0jVXRrFXjFQK+t9M0Y3lagttU/SBu0E98P2OPYW1 KP66uN+s4T/Azpjw8mqwZvBTcwr7AUsRRrX3q2ZA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Geert Uytterhoeven , Anna Schumaker Subject: [PATCH 4.9 101/116] nfs: NFS_SWAP should depend on SWAP Date: Thu, 13 Feb 2020 07:20:45 -0800 Message-Id: <20200213151921.815202739@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200213151842.259660170@linuxfoundation.org> References: <20200213151842.259660170@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Geert Uytterhoeven commit 474c4f306eefbb21b67ebd1de802d005c7d7ecdc upstream. If CONFIG_SWAP=n, it does not make much sense to offer the user the option to enable support for swapping over NFS, as that will still fail at run time: # swapon /swap swapon: /swap: swapon failed: Function not implemented Fix this by adding a dependency on CONFIG_SWAP. Fixes: a564b8f0398636ba ("nfs: enable swap on NFS") Signed-off-by: Geert Uytterhoeven Signed-off-by: Anna Schumaker Signed-off-by: Greg Kroah-Hartman --- fs/nfs/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/nfs/Kconfig +++ b/fs/nfs/Kconfig @@ -89,7 +89,7 @@ config NFS_V4 config NFS_SWAP bool "Provide swap over NFS support" default n - depends on NFS_FS + depends on NFS_FS && SWAP select SUNRPC_SWAP help This option enables swapon to work on files located on NFS mounts.