Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3927359imm; Mon, 8 Oct 2018 11:49:30 -0700 (PDT) X-Google-Smtp-Source: ACcGV63denGu09SmOaH4QVlEx1ZGXInHXvTyGRYPl8L/tOM9GgQxgpG2Wnqa84SkFU9NvObAWQ1v X-Received: by 2002:a62:9e52:: with SMTP id s79-v6mr27002168pfd.110.1539024570863; Mon, 08 Oct 2018 11:49:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539024570; cv=none; d=google.com; s=arc-20160816; b=fyVQYryLNJcoagAiQsEfLyRLiOHerY9qrvCxeHNWg3i6Ok1+VjsqRXD4zYafvWlcJJ k2BMJIl5zBTIDb/NDaUxLF4GsgoO40DGYPbMLgy7JgG6negTvrTRr0Eq4T8WsOfD2hca NNVhAbR8mgCeIvTpFgrXLp1C4jT9DZyp4dLbw2YnSXVqGXCcVq/pMjcZAX9PKxzqtJU8 kzlSS01gB88eh0aQFdp9Os5LcQKJGqYZiyH+Px0NUSMRx48VnYpfMoIJ1eVQwYiR1h9X xfhhmXQl7WvZwQEdwB2fl2HuUiTlc0dOn27o1OeFrukEe0QJ2DWBRIhH80teGO0JEQRz l0cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=t0k0eESB2TUxxATePM0G6gjg3wsnCIuZ1Za30gZgp5Q=; b=xyIK62LBnBFqo+6FM+soxDKiLfleV5HYJUkmvuYUffOpMGZdHNUAlbt+Cb2o8OTVbP 7nvdYy10j3jL3aPAnIRujXs+MKHbFc3XB4ZJIxQPfxSuFwwN7o0cOEDxpAcwVjQ1CRdj vWH0mTcLg445Pr8ersJIuap+SADMmGG8uhs3PFnEbI4yUEqaYaEaB5EajRzdYnG/OpNY pPRgNC6DYnwBLQFhRAPMkWcWWbYxtoLd1ePx9MeNAR31cfuqL5T/hQxWhdB7qo5fAP9n WBeMSSvfMYtagtkmctqXDCn4cTPAKh6tDsxLAy3Gjd3g9Apxdy/XIYaimjYK0aoWbdlR uE1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=l2xpc9l9; 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 f3-v6si18272471pld.416.2018.10.08.11.49.15; Mon, 08 Oct 2018 11:49:30 -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; dkim=pass header.i=@kernel.org header.s=default header.b=l2xpc9l9; 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 S1731804AbeJICCP (ORCPT + 99 others); Mon, 8 Oct 2018 22:02:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:51492 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726991AbeJICCP (ORCPT ); Mon, 8 Oct 2018 22:02:15 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (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 E1D13214C4; Mon, 8 Oct 2018 18:49:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539024548; bh=Fn5gEE+s5YnT98NaZWaXowX8USnsTFaQuJSauAmgg/w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l2xpc9l9G23O+M9bufk8l3UsnfkLrLkCRK/CSSBGkGRiy2yk6VCI0b8cmpL8TLRCf BorHyH5lhMJiXmQ+dKVMd74TJQrMYIssV6OVlQllfLRuyPxvZky/FOtecvtqJEUzgx GtUegtwQafERPi0qaqmsUBbJoUN7kfDQt9rckUms= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Howells , Linus Torvalds , Sasha Levin Subject: [PATCH 4.18 076/168] afs: Fix cell specification to permit an empty address list Date: Mon, 8 Oct 2018 20:30:56 +0200 Message-Id: <20181008175622.960987459@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181008175620.043587728@linuxfoundation.org> References: <20181008175620.043587728@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: David Howells [ Upstream commit ecfe951f0c1b169ea4b7dd6f3a404dfedd795bc2 ] Fix the cell specification mechanism to allow cells to be pre-created without having to specify at least one address (the addresses will be upcalled for). This allows the cell information preload service to avoid the need to issue loads of DNS lookups during boot to get the addresses for each cell (500+ lookups for the 'standard' cell list[*]). The lookups can be done later as each cell is accessed through the filesystem. Also remove the print statement that prints a line every time a new cell is added. [*] There are 144 cells in the list. Each cell is first looked up for an SRV record, and if that fails, for an AFSDB record. These get a list of server names, each of which then has to be looked up to get the addresses for that server. E.g.: dig srv _afs3-vlserver._udp.grand.central.org Signed-off-by: David Howells Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- fs/afs/proc.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) --- a/fs/afs/proc.c +++ b/fs/afs/proc.c @@ -98,13 +98,13 @@ static int afs_proc_cells_write(struct f goto inval; args = strchr(name, ' '); - if (!args) - goto inval; - do { - *args++ = 0; - } while(*args == ' '); - if (!*args) - goto inval; + if (args) { + do { + *args++ = 0; + } while(*args == ' '); + if (!*args) + goto inval; + } /* determine command to perform */ _debug("cmd=%s name=%s args=%s", buf, name, args); @@ -120,7 +120,6 @@ static int afs_proc_cells_write(struct f if (test_and_set_bit(AFS_CELL_FL_NO_GC, &cell->flags)) afs_put_cell(net, cell); - printk("kAFS: Added new cell '%s'\n", name); } else { goto inval; }