diff options
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r-- | fs/nfs/super.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index dac663dc5611..614efeed5437 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -1249,13 +1249,13 @@ static int nfs_validate_mount_data(void *options, | |||
1249 | case 5: | 1249 | case 5: |
1250 | memset(data->context, 0, sizeof(data->context)); | 1250 | memset(data->context, 0, sizeof(data->context)); |
1251 | case 6: | 1251 | case 6: |
1252 | if (data->flags & NFS_MOUNT_VER3) | 1252 | if (data->flags & NFS_MOUNT_VER3) { |
1253 | if (data->root.size > NFS3_FHSIZE || data->root.size == 0) | ||
1254 | goto out_invalid_fh; | ||
1253 | mntfh->size = data->root.size; | 1255 | mntfh->size = data->root.size; |
1254 | else | 1256 | } else |
1255 | mntfh->size = NFS2_FHSIZE; | 1257 | mntfh->size = NFS2_FHSIZE; |
1256 | 1258 | ||
1257 | if (mntfh->size > sizeof(mntfh->data)) | ||
1258 | goto out_invalid_fh; | ||
1259 | 1259 | ||
1260 | memcpy(mntfh->data, data->root.data, mntfh->size); | 1260 | memcpy(mntfh->data, data->root.data, mntfh->size); |
1261 | if (mntfh->size < sizeof(mntfh->data)) | 1261 | if (mntfh->size < sizeof(mntfh->data)) |