From patchwork Wed Dec 8 09:40:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislav Kinsbursky X-Patchwork-Id: 390292 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 oB89eiQR002244 for ; Wed, 8 Dec 2010 09:40:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754054Ab0LHJkn (ORCPT ); Wed, 8 Dec 2010 04:40:43 -0500 Received: from mailhub.sw.ru ([195.214.232.25]:11476 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751782Ab0LHJkm (ORCPT ); Wed, 8 Dec 2010 04:40:42 -0500 Received: from localhost6.localdomain6 ([10.30.20.35]) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id oB89e4S0005664; Wed, 8 Dec 2010 12:40:07 +0300 (MSK) Subject: [PATCH v3] 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, xemul@parallels.com Date: Wed, 08 Dec 2010 12:40:13 +0300 Message-ID: <20101208093311.8223.29784.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]); Wed, 08 Dec 2010 09:40:45 +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);