Return-Path: linux-nfs-owner@vger.kernel.org Received: from riis.snl.salk.edu ([198.202.70.55]:50224 "EHLO riis.snl.salk.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751881Ab2IPKbw (ORCPT ); Sun, 16 Sep 2012 06:31:52 -0400 Subject: Re: NFS: kernel forces trailing slash for export in /proc/self/mounts Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: multipart/signed; boundary="Apple-Mail=_97D820A4-146E-42E7-915C-AE92C3461758"; protocol="application/pkcs7-signature"; micalg=sha1 From: Chris Hiestand In-Reply-To: <1347762073.13258.188.camel@deadeye.wl.decadent.org.uk> Date: Sun, 16 Sep 2012 03:24:04 -0700 Cc: viro@zeniv.linux.org.uk, Trond Myklebust , linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, 669314@bugs.debian.org, Micheal Waltz , Gabriel Evanoff Message-Id: <254E1AAA-BDE2-41A8-94D8-6E677860AD72@salk.edu> References: <8F8193BD-84C6-4905-8789-DE7EB2579A4E@salk.edu> <1347762073.13258.188.camel@deadeye.wl.decadent.org.uk> To: Ben Hutchings Sender: linux-nfs-owner@vger.kernel.org List-ID: --Apple-Mail=_97D820A4-146E-42E7-915C-AE92C3461758 Content-Type: multipart/mixed; boundary="Apple-Mail=_60139FB5-DCB0-42ED-877E-C304D60757EB" --Apple-Mail=_60139FB5-DCB0-42ED-877E-C304D60757EB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii I had a couple friends over today and we made a trivial patch to remove = trailing slashes. We do not know C and have never created a patch for = the kernel before, so there is undoubtedly a better way to do it. = However we hope this helps in your efforts. --Apple-Mail=_60139FB5-DCB0-42ED-877E-C304D60757EB Content-Disposition: attachment; filename=0001-Fixes-trailing-slash-in-nfs-devname.patch Content-Type: application/octet-stream; name="0001-Fixes-trailing-slash-in-nfs-devname.patch" Content-Transfer-Encoding: quoted-printable =46rom=2081baa04c07107f81c56c4f163da2178b01294717=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Chris=20Hiestand=20=0A= Date:=20Sat,=2015=20Sep=202012=2018:40:45=20-0700=0ASubject:=20[PATCH]=20= Fixes=20trailing=20slash=20in=20nfs=20devname=0A=0A---=0A=20= fs/nfs/super.c=20|=20=20=20=206=20+++++-=0A=201=20file=20changed,=205=20= insertions(+),=201=20deletion(-)=0A=0Adiff=20--git=20a/fs/nfs/super.c=20= b/fs/nfs/super.c=0Aindex=2079bc61f..e300a84=20100644=0A---=20= a/fs/nfs/super.c=0A+++=20b/fs/nfs/super.c=0A@@=20-742,8=20+742,12=20@@=20= static=20int=20nfs_show_devname(struct=20seq_file=20*m,=20struct=20= vfsmount=20*mnt)=0A=20=09devname=20=3D=20nfs_path(&dummy,=20= mnt->mnt_root,=20page,=20PAGE_SIZE);=0A=20=09if=20(IS_ERR(devname))=0A=20= =09=09err=20=3D=20PTR_ERR(devname);=0A-=09else=0A+=09else=20{=0A+=09=09= size_t=20len=20=3D=20strlen(devname);=0A+=09=09if=20(devname[len-1]=20=3D=3D= =20'/')=0A+=09=09=09devname[len-1]=20=3D=20'\0';=0A=20=09=09= seq_escape(m,=20devname,=20"=20\t\n\\");=0A+=09}=0A=20=09= free_page((unsigned=20long)page);=0A=20=09return=20err;=0A=20}=0A--=20=0A= 1.7.10.4=0A=0A= --Apple-Mail=_60139FB5-DCB0-42ED-877E-C304D60757EB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii This patch was created from the offending commit (c7f404b40a366). But = I've also applied it to to Linus Torvalds' master HEAD (3f0c3c8fe30c7) = with success. -Chris= --Apple-Mail=_60139FB5-DCB0-42ED-877E-C304D60757EB-- --Apple-Mail=_97D820A4-146E-42E7-915C-AE92C3461758 Content-Disposition: attachment; filename=smime.p7s Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIO1TCCBIow ggNyo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