From patchwork Mon Dec 6 09:00:31 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislav Kinsbursky X-Patchwork-Id: 377382 X-Patchwork-Delegate: Trond.Myklebust@netapp.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oB68x6K7005128 for ; Mon, 6 Dec 2010 08:59:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752066Ab0LFI7d (ORCPT ); Mon, 6 Dec 2010 03:59:33 -0500 Received: from mailhub.sw.ru ([195.214.232.25]:7574 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751620Ab0LFI7c (ORCPT ); Mon, 6 Dec 2010 03:59:32 -0500 Received: from localhost6.localdomain6 ([10.30.20.35]) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id oB68xQEa020818; Mon, 6 Dec 2010 11:59:27 +0300 (MSK) Subject: [PATCH v2] NFS: suppressing showing of default mount port value in /proc fixed To: Trond.Myklebust@netapp.com From: Stanislav Kinsbursky Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 06 Dec 2010 12:00:31 +0300 Message-ID: <20101206085553.2172.24863.stgit@localhost6.localdomain6> User-Agent: StGit/0.15 MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 06 Dec 2010 08:59:34 +0000 (UTC) diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 6d6e21d..449024f 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -681,7 +681,9 @@ static void nfs_show_mountd_options(struct seq_file *m, struct nfs_server *nfss, if (nfss->mountd_version || showdefaults) seq_printf(m, ",mountvers=%u", nfss->mountd_version); - if (nfss->mountd_port || showdefaults) + if ((nfss->mountd_port && + nfss->mountd_port != (unsigned short)NFS_UNSPEC_PORT) || + showdefaults) seq_printf(m, ",mountport=%u", nfss->mountd_port); nfs_show_mountd_netid(m, nfss, showdefaults);