NFS: super: mark expected switch fall-throughs

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Addresses-Coverity-ID: 703509
Addresses-Coverity-ID: 703510
Addresses-Coverity-ID: 703511
Addresses-Coverity-ID: 703512
Addresses-Coverity-ID: 703513
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
Gustavo A. R. Silva 2017-11-08 20:49:19 -06:00 committed by Anna Schumaker
parent 6c67a3e4a4
commit fd53dde839
1 changed files with 10 additions and 2 deletions

View File

@ -1456,18 +1456,21 @@ static int nfs_parse_mount_options(char *raw,
switch (token) { switch (token) {
case Opt_xprt_udp6: case Opt_xprt_udp6:
protofamily = AF_INET6; protofamily = AF_INET6;
/* fall through */
case Opt_xprt_udp: case Opt_xprt_udp:
mnt->flags &= ~NFS_MOUNT_TCP; mnt->flags &= ~NFS_MOUNT_TCP;
mnt->nfs_server.protocol = XPRT_TRANSPORT_UDP; mnt->nfs_server.protocol = XPRT_TRANSPORT_UDP;
break; break;
case Opt_xprt_tcp6: case Opt_xprt_tcp6:
protofamily = AF_INET6; protofamily = AF_INET6;
/* fall through */
case Opt_xprt_tcp: case Opt_xprt_tcp:
mnt->flags |= NFS_MOUNT_TCP; mnt->flags |= NFS_MOUNT_TCP;
mnt->nfs_server.protocol = XPRT_TRANSPORT_TCP; mnt->nfs_server.protocol = XPRT_TRANSPORT_TCP;
break; break;
case Opt_xprt_rdma6: case Opt_xprt_rdma6:
protofamily = AF_INET6; protofamily = AF_INET6;
/* fall through */
case Opt_xprt_rdma: case Opt_xprt_rdma:
/* vector side protocols to TCP */ /* vector side protocols to TCP */
mnt->flags |= NFS_MOUNT_TCP; mnt->flags |= NFS_MOUNT_TCP;
@ -1494,11 +1497,13 @@ static int nfs_parse_mount_options(char *raw,
switch (token) { switch (token) {
case Opt_xprt_udp6: case Opt_xprt_udp6:
mountfamily = AF_INET6; mountfamily = AF_INET6;
/* fall through */
case Opt_xprt_udp: case Opt_xprt_udp:
mnt->mount_server.protocol = XPRT_TRANSPORT_UDP; mnt->mount_server.protocol = XPRT_TRANSPORT_UDP;
break; break;
case Opt_xprt_tcp6: case Opt_xprt_tcp6:
mountfamily = AF_INET6; mountfamily = AF_INET6;
/* fall through */
case Opt_xprt_tcp: case Opt_xprt_tcp:
mnt->mount_server.protocol = XPRT_TRANSPORT_TCP; mnt->mount_server.protocol = XPRT_TRANSPORT_TCP;
break; break;
@ -1988,9 +1993,9 @@ static int nfs23_validate_mount_data(void *options,
args->version = NFS_DEFAULT_VERSION; args->version = NFS_DEFAULT_VERSION;
switch (data->version) { switch (data->version) {
case 1: case 1:
data->namlen = 0; data->namlen = 0; /* fall through */
case 2: case 2:
data->bsize = 0; data->bsize = 0; /* fall through */
case 3: case 3:
if (data->flags & NFS_MOUNT_VER3) if (data->flags & NFS_MOUNT_VER3)
goto out_no_v3; goto out_no_v3;
@ -1998,11 +2003,14 @@ static int nfs23_validate_mount_data(void *options,
memcpy(data->root.data, data->old_root.data, NFS2_FHSIZE); memcpy(data->root.data, data->old_root.data, NFS2_FHSIZE);
/* Turn off security negotiation */ /* Turn off security negotiation */
extra_flags |= NFS_MOUNT_SECFLAVOUR; extra_flags |= NFS_MOUNT_SECFLAVOUR;
/* fall through */
case 4: case 4:
if (data->flags & NFS_MOUNT_SECFLAVOUR) if (data->flags & NFS_MOUNT_SECFLAVOUR)
goto out_no_sec; goto out_no_sec;
/* fall through */
case 5: case 5:
memset(data->context, 0, sizeof(data->context)); memset(data->context, 0, sizeof(data->context));
/* fall through */
case 6: case 6:
if (data->flags & NFS_MOUNT_VER3) { if (data->flags & NFS_MOUNT_VER3) {
if (data->root.size > NFS3_FHSIZE || data->root.size == 0) if (data->root.size > NFS3_FHSIZE || data->root.size == 0)