diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2019-01-30 16:58:38 +0300 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-02-21 01:33:55 +0300 |
commit | 40cc394be1aa18848b8757e03bd8ed23281f572e (patch) | |
tree | e33e19294ff39b79f35eaf4cc711401e8865b905 /fs/nfs/super.c | |
parent | e3735c89985415f4fb509c67963e3d05969fbdb1 (diff) | |
download | linux-40cc394be1aa18848b8757e03bd8ed23281f572e.tar.xz |
fs/nfs: Fix nfs_parse_devname to not modify it's argument
In the rare and unsupported case of a hostname list nfs_parse_devname
will modify dev_name. There is no need to modify dev_name as the all
that is being computed is the length of the hostname, so the computed
length can just be shorted.
Fixes: dc04589827f7 ("NFS: Use common device name parsing logic for NFSv4 and NFSv2/v3")
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r-- | fs/nfs/super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 0570391eaa16..23790c7b2289 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -1919,7 +1919,7 @@ static int nfs_parse_devname(const char *dev_name, /* kill possible hostname list: not supported */ comma = strchr(dev_name, ','); if (comma != NULL && comma < end) - *comma = 0; + len = comma - dev_name; } if (len > maxnamlen) |