Hi Ben, On 06/15/2016 03:02 PM, Benjamin Coddington wrote: > A NFSv4 mount of a subdirectory will show an extra slash (as in > 'server://path') in proc's mountinfo which will not match the device name > and path. This can cause problems for programs searching for the mount. > Fix this by checking for a leading slash in the dentry path, if so trim > away any trailing slashes in the device name. > > Signed-off-by: Benjamin Coddington <bcodding@xxxxxxxxxx> > --- > fs/nfs/namespace.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/nfs/namespace.c b/fs/nfs/namespace.c > index c8162c660c44..5551e8ef67fd 100644 > --- a/fs/nfs/namespace.c > +++ b/fs/nfs/namespace.c > @@ -98,7 +98,7 @@ rename_retry: > return end; > } > namelen = strlen(base); > - if (flags & NFS_PATH_CANONICAL) { > + if (*end == '/') { Are we getting here through nfs_show_devname()? Because it looks like that function is passing 0 for flags instead of NFS_PATH_CANONICAL. Earlier in this function we have a check for: if ((flags & NFS_PATH_CANONICAL) && *end != '/') Should we be checking if NFS_PATH_CANONICAL is set here, too? Thanks, Anna > /* Strip off excess slashes in base string */ > while (namelen > 0 && base[namelen - 1] == '/') > namelen--; > -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html