aboutsummaryrefslogtreecommitdiff
path: root/fs/nfs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r--fs/nfs/super.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 9cd0828010c..ef3643284f7 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1153,7 +1153,7 @@ static int nfs_validate_mount_data(struct nfs_mount_data **options,
c = strchr(dev_name, ':');
if (c == NULL)
return -EINVAL;
- len = c - dev_name - 1;
+ len = c - dev_name;
if (len > sizeof(data->hostname))
return -EINVAL;
strncpy(data->hostname, dev_name, len);