From patchwork Wed Aug 20 03:06:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Murphy Zhou X-Patchwork-Id: 4747291 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 22C639F377 for ; Wed, 20 Aug 2014 03:06:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 668D62015E for ; Wed, 20 Aug 2014 03:06:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7237320155 for ; Wed, 20 Aug 2014 03:06:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751438AbaHTDGr (ORCPT ); Tue, 19 Aug 2014 23:06:47 -0400 Received: from mx3-phx2.redhat.com ([209.132.183.24]:47908 "EHLO mx3-phx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750979AbaHTDGr (ORCPT ); Tue, 19 Aug 2014 23:06:47 -0400 Received: from zmail22.collab.prod.int.phx2.redhat.com (zmail22.collab.prod.int.phx2.redhat.com [10.5.83.26]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s7K36eFl022915; Tue, 19 Aug 2014 23:06:41 -0400 Date: Tue, 19 Aug 2014 23:06:40 -0400 (EDT) From: Xiong Zhou To: trond.myklebust@primarydata.com Cc: linux-nfs@vger.kernel.org, ben@decadent.org.uk, linux-kernel@vger.kernel.org Message-ID: <1927160445.21851828.1408504000719.JavaMail.zimbra@redhat.com> In-Reply-To: <600788954.21849581.1408502615727.JavaMail.zimbra@redhat.com> Subject: [PATCH] nfs: use canonical path in nfs_show_devname MIME-Version: 1.0 X-Originating-IP: [10.5.82.6] X-Mailer: Zimbra 8.0.6_GA_5922 (ZimbraWebClient - FF24 (Linux)/8.0.6_GA_5922) Thread-Topic: use canonical path in nfs_show_devname Thread-Index: Kcq73E6nbZ++gc34YCEBttYFmblleA== Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When export root dir(/) via nfs, and mount a particular dir under root, eg /nfsexport, there will be defect double slash output in /proc/mounts, like localhost://nfsexport. Signed-off-by: Xiong Zhou --- fs/nfs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/super.c b/fs/nfs/super.c index e4499d5..62b1cab 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -780,7 +780,7 @@ int nfs_show_devname(struct seq_file *m, struct dentry *root) int err = 0; if (!page) return -ENOMEM; - devname = nfs_path(&dummy, root, page, PAGE_SIZE, 0); + devname = nfs_path(&dummy, root, page, PAGE_SIZE, 1); if (IS_ERR(devname)) err = PTR_ERR(devname); else