Skip to content

Commit fd53dde

Browse files
GustavoARSilvaamschuma-ntap
authored andcommitted
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>
1 parent 6c67a3e commit fd53dde

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

fs/nfs/super.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1456,18 +1456,21 @@ static int nfs_parse_mount_options(char *raw,
14561456
switch (token) {
14571457
case Opt_xprt_udp6:
14581458
protofamily = AF_INET6;
1459+
/* fall through */
14591460
case Opt_xprt_udp:
14601461
mnt->flags &= ~NFS_MOUNT_TCP;
14611462
mnt->nfs_server.protocol = XPRT_TRANSPORT_UDP;
14621463
break;
14631464
case Opt_xprt_tcp6:
14641465
protofamily = AF_INET6;
1466+
/* fall through */
14651467
case Opt_xprt_tcp:
14661468
mnt->flags |= NFS_MOUNT_TCP;
14671469
mnt->nfs_server.protocol = XPRT_TRANSPORT_TCP;
14681470
break;
14691471
case Opt_xprt_rdma6:
14701472
protofamily = AF_INET6;
1473+
/* fall through */
14711474
case Opt_xprt_rdma:
14721475
/* vector side protocols to TCP */
14731476
mnt->flags |= NFS_MOUNT_TCP;
@@ -1494,11 +1497,13 @@ static int nfs_parse_mount_options(char *raw,
14941497
switch (token) {
14951498
case Opt_xprt_udp6:
14961499
mountfamily = AF_INET6;
1500+
/* fall through */
14971501
case Opt_xprt_udp:
14981502
mnt->mount_server.protocol = XPRT_TRANSPORT_UDP;
14991503
break;
15001504
case Opt_xprt_tcp6:
15011505
mountfamily = AF_INET6;
1506+
/* fall through */
15021507
case Opt_xprt_tcp:
15031508
mnt->mount_server.protocol = XPRT_TRANSPORT_TCP;
15041509
break;
@@ -1988,21 +1993,24 @@ static int nfs23_validate_mount_data(void *options,
19881993
args->version = NFS_DEFAULT_VERSION;
19891994
switch (data->version) {
19901995
case 1:
1991-
data->namlen = 0;
1996+
data->namlen = 0; /* fall through */
19921997
case 2:
1993-
data->bsize = 0;
1998+
data->bsize = 0; /* fall through */
19941999
case 3:
19952000
if (data->flags & NFS_MOUNT_VER3)
19962001
goto out_no_v3;
19972002
data->root.size = NFS2_FHSIZE;
19982003
memcpy(data->root.data, data->old_root.data, NFS2_FHSIZE);
19992004
/* Turn off security negotiation */
20002005
extra_flags |= NFS_MOUNT_SECFLAVOUR;
2006+
/* fall through */
20012007
case 4:
20022008
if (data->flags & NFS_MOUNT_SECFLAVOUR)
20032009
goto out_no_sec;
2010+
/* fall through */
20042011
case 5:
20052012
memset(data->context, 0, sizeof(data->context));
2013+
/* fall through */
20062014
case 6:
20072015
if (data->flags & NFS_MOUNT_VER3) {
20082016
if (data->root.size > NFS3_FHSIZE || data->root.size == 0)

0 commit comments

Comments
 (0)