aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2019-01-10 16:52:25 -0500
committerGustavo A. R. Silva <gustavo@embeddedor.com>2019-04-08 19:35:56 -0400
commite690c9e3f4fb2cc589414c5bf502dcfe04e685de (patch)
tree2dfca439baaf49dd2db944d0b9edbf4197a7ffa6 /fs/afs
parent0a4c92657f2543bb8fd480c5af90c6bb87f18e00 (diff)
afs: Mark expected switch fall-throughs
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in many cases I placed a /* Fall through */ comment at the bottom of the case, which what GCC is expecting to find. In other cases I had to tweak a bit the format of the comments. This patch suppresses ALL missing-break-in-switch false positives in fs/afs Addresses-Coverity-ID: 115042 ("Missing break in switch") Addresses-Coverity-ID: 115043 ("Missing break in switch") Addresses-Coverity-ID: 115045 ("Missing break in switch") Addresses-Coverity-ID: 1357430 ("Missing break in switch") Addresses-Coverity-ID: 115047 ("Missing break in switch") Addresses-Coverity-ID: 115050 ("Missing break in switch") Addresses-Coverity-ID: 115051 ("Missing break in switch") Addresses-Coverity-ID: 1467806 ("Missing break in switch") Addresses-Coverity-ID: 1467807 ("Missing break in switch") Addresses-Coverity-ID: 1467811 ("Missing break in switch") Addresses-Coverity-ID: 115041 ("Missing break in switch") Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Diffstat (limited to 'fs/afs')
-rw-r--r--fs/afs/cmservice.c8
-rw-r--r--fs/afs/file.c2
-rw-r--r--fs/afs/flock.c1
-rw-r--r--fs/afs/fsclient.c31
-rw-r--r--fs/afs/misc.c9
-rw-r--r--fs/afs/rxrpc.c1
-rw-r--r--fs/afs/vlclient.c18
-rw-r--r--fs/afs/yfsclient.c30
8 files changed, 71 insertions, 29 deletions
diff --git a/fs/afs/cmservice.c b/fs/afs/cmservice.c
index 8ee5972893ed..40e09bf547e3 100644
--- a/fs/afs/cmservice.c
+++ b/fs/afs/cmservice.c
@@ -285,6 +285,7 @@ static int afs_deliver_cb_callback(struct afs_call *call)
285 call->unmarshall++; 285 call->unmarshall++;
286 286
287 /* extract the FID array and its count in two steps */ 287 /* extract the FID array and its count in two steps */
288 /* fall through */
288 case 1: 289 case 1:
289 _debug("extract FID count"); 290 _debug("extract FID count");
290 ret = afs_extract_data(call, true); 291 ret = afs_extract_data(call, true);
@@ -304,6 +305,7 @@ static int afs_deliver_cb_callback(struct afs_call *call)
304 afs_extract_to_buf(call, call->count * 3 * 4); 305 afs_extract_to_buf(call, call->count * 3 * 4);
305 call->unmarshall++; 306 call->unmarshall++;
306 307
308 /* Fall through */
307 case 2: 309 case 2:
308 _debug("extract FID array"); 310 _debug("extract FID array");
309 ret = afs_extract_data(call, true); 311 ret = afs_extract_data(call, true);
@@ -329,6 +331,7 @@ static int afs_deliver_cb_callback(struct afs_call *call)
329 call->unmarshall++; 331 call->unmarshall++;
330 332
331 /* extract the callback array and its count in two steps */ 333 /* extract the callback array and its count in two steps */
334 /* fall through */
332 case 3: 335 case 3:
333 _debug("extract CB count"); 336 _debug("extract CB count");
334 ret = afs_extract_data(call, true); 337 ret = afs_extract_data(call, true);
@@ -344,6 +347,7 @@ static int afs_deliver_cb_callback(struct afs_call *call)
344 iov_iter_discard(&call->iter, READ, call->count2 * 3 * 4); 347 iov_iter_discard(&call->iter, READ, call->count2 * 3 * 4);
345 call->unmarshall++; 348 call->unmarshall++;
346 349
350 /* Fall through */
347 case 4: 351 case 4:
348 _debug("extract discard %zu/%u", 352 _debug("extract discard %zu/%u",
349 iov_iter_count(&call->iter), call->count2 * 3 * 4); 353 iov_iter_count(&call->iter), call->count2 * 3 * 4);
@@ -422,6 +426,7 @@ static int afs_deliver_cb_init_call_back_state3(struct afs_call *call)
422 afs_extract_to_buf(call, 11 * sizeof(__be32)); 426 afs_extract_to_buf(call, 11 * sizeof(__be32));
423 call->unmarshall++; 427 call->unmarshall++;
424 428
429 /* Fall through */
425 case 1: 430 case 1:
426 _debug("extract UUID"); 431 _debug("extract UUID");
427 ret = afs_extract_data(call, false); 432 ret = afs_extract_data(call, false);
@@ -537,6 +542,7 @@ static int afs_deliver_cb_probe_uuid(struct afs_call *call)
537 afs_extract_to_buf(call, 11 * sizeof(__be32)); 542 afs_extract_to_buf(call, 11 * sizeof(__be32));
538 call->unmarshall++; 543 call->unmarshall++;
539 544
545 /* Fall through */
540 case 1: 546 case 1:
541 _debug("extract UUID"); 547 _debug("extract UUID");
542 ret = afs_extract_data(call, false); 548 ret = afs_extract_data(call, false);
@@ -673,6 +679,7 @@ static int afs_deliver_yfs_cb_callback(struct afs_call *call)
673 call->unmarshall++; 679 call->unmarshall++;
674 680
675 /* extract the FID array and its count in two steps */ 681 /* extract the FID array and its count in two steps */
682 /* Fall through */
676 case 1: 683 case 1:
677 _debug("extract FID count"); 684 _debug("extract FID count");
678 ret = afs_extract_data(call, true); 685 ret = afs_extract_data(call, true);
@@ -692,6 +699,7 @@ static int afs_deliver_yfs_cb_callback(struct afs_call *call)
692 afs_extract_to_buf(call, size); 699 afs_extract_to_buf(call, size);
693 call->unmarshall++; 700 call->unmarshall++;
694 701
702 /* Fall through */
695 case 2: 703 case 2:
696 _debug("extract FID array"); 704 _debug("extract FID array");
697 ret = afs_extract_data(call, false); 705 ret = afs_extract_data(call, false);
diff --git a/fs/afs/file.c b/fs/afs/file.c
index 323ae9912203..e8d6619890a9 100644
--- a/fs/afs/file.c
+++ b/fs/afs/file.c
@@ -300,6 +300,8 @@ int afs_page_filler(void *data, struct page *page)
300 /* page will not be cached */ 300 /* page will not be cached */
301 case -ENOBUFS: 301 case -ENOBUFS:
302 _debug("cache said ENOBUFS"); 302 _debug("cache said ENOBUFS");
303
304 /* fall through */
303 default: 305 default:
304 go_on: 306 go_on:
305 req = kzalloc(sizeof(struct afs_read) + sizeof(struct page *), 307 req = kzalloc(sizeof(struct afs_read) + sizeof(struct page *),
diff --git a/fs/afs/flock.c b/fs/afs/flock.c
index e432bd27a2e7..6a0174258382 100644
--- a/fs/afs/flock.c
+++ b/fs/afs/flock.c
@@ -303,6 +303,7 @@ again:
303 return; 303 return;
304 } 304 }
305 305
306 /* Fall through */
306 default: 307 default:
307 /* Looks like a lock request was withdrawn. */ 308 /* Looks like a lock request was withdrawn. */
308 spin_unlock(&vnode->lock); 309 spin_unlock(&vnode->lock);
diff --git a/fs/afs/fsclient.c b/fs/afs/fsclient.c
index ca08c83168f5..06277408477b 100644
--- a/fs/afs/fsclient.c
+++ b/fs/afs/fsclient.c
@@ -498,7 +498,7 @@ static int afs_deliver_fs_fetch_data(struct afs_call *call)
498 afs_extract_to_tmp(call); 498 afs_extract_to_tmp(call);
499 } 499 }
500 500
501 /* extract the returned data length */ 501 /* Fall through - and extract the returned data length */
502 case 1: 502 case 1:
503 _debug("extract data length"); 503 _debug("extract data length");
504 ret = afs_extract_data(call, true); 504 ret = afs_extract_data(call, true);
@@ -525,7 +525,7 @@ static int afs_deliver_fs_fetch_data(struct afs_call *call)
525 iov_iter_bvec(&call->iter, READ, call->bvec, 1, size); 525 iov_iter_bvec(&call->iter, READ, call->bvec, 1, size);
526 ASSERTCMP(size, <=, PAGE_SIZE); 526 ASSERTCMP(size, <=, PAGE_SIZE);
527 527
528 /* extract the returned data */ 528 /* Fall through - and extract the returned data */
529 case 2: 529 case 2:
530 _debug("extract data %zu/%llu", 530 _debug("extract data %zu/%llu",
531 iov_iter_count(&call->iter), req->remain); 531 iov_iter_count(&call->iter), req->remain);
@@ -552,6 +552,8 @@ static int afs_deliver_fs_fetch_data(struct afs_call *call)
552 /* Discard any excess data the server gave us */ 552 /* Discard any excess data the server gave us */
553 iov_iter_discard(&call->iter, READ, req->actual_len - req->len); 553 iov_iter_discard(&call->iter, READ, req->actual_len - req->len);
554 call->unmarshall = 3; 554 call->unmarshall = 3;
555
556 /* Fall through */
555 case 3: 557 case 3:
556 _debug("extract discard %zu/%llu", 558 _debug("extract discard %zu/%llu",
557 iov_iter_count(&call->iter), req->actual_len - req->len); 559 iov_iter_count(&call->iter), req->actual_len - req->len);
@@ -564,7 +566,7 @@ static int afs_deliver_fs_fetch_data(struct afs_call *call)
564 call->unmarshall = 4; 566 call->unmarshall = 4;
565 afs_extract_to_buf(call, (21 + 3 + 6) * 4); 567 afs_extract_to_buf(call, (21 + 3 + 6) * 4);
566 568
567 /* extract the metadata */ 569 /* Fall through - and extract the metadata */
568 case 4: 570 case 4:
569 ret = afs_extract_data(call, false); 571 ret = afs_extract_data(call, false);
570 if (ret < 0) 572 if (ret < 0)
@@ -1634,7 +1636,7 @@ static int afs_deliver_fs_get_volume_status(struct afs_call *call)
1634 call->unmarshall++; 1636 call->unmarshall++;
1635 afs_extract_to_buf(call, 12 * 4); 1637 afs_extract_to_buf(call, 12 * 4);
1636 1638
1637 /* extract the returned status record */ 1639 /* Fall through - and extract the returned status record */
1638 case 1: 1640 case 1:
1639 _debug("extract status"); 1641 _debug("extract status");
1640 ret = afs_extract_data(call, true); 1642 ret = afs_extract_data(call, true);
@@ -1646,7 +1648,7 @@ static int afs_deliver_fs_get_volume_status(struct afs_call *call)
1646 call->unmarshall++; 1648 call->unmarshall++;
1647 afs_extract_to_tmp(call); 1649 afs_extract_to_tmp(call);
1648 1650
1649 /* extract the volume name length */ 1651 /* Fall through - and extract the volume name length */
1650 case 2: 1652 case 2:
1651 ret = afs_extract_data(call, true); 1653 ret = afs_extract_data(call, true);
1652 if (ret < 0) 1654 if (ret < 0)
@@ -1661,7 +1663,7 @@ static int afs_deliver_fs_get_volume_status(struct afs_call *call)
1661 afs_extract_begin(call, call->reply[2], size); 1663 afs_extract_begin(call, call->reply[2], size);
1662 call->unmarshall++; 1664 call->unmarshall++;
1663 1665
1664 /* extract the volume name */ 1666 /* Fall through - and extract the volume name */
1665 case 3: 1667 case 3:
1666 _debug("extract volname"); 1668 _debug("extract volname");
1667 ret = afs_extract_data(call, true); 1669 ret = afs_extract_data(call, true);
@@ -1674,7 +1676,7 @@ static int afs_deliver_fs_get_volume_status(struct afs_call *call)
1674 afs_extract_to_tmp(call); 1676 afs_extract_to_tmp(call);
1675 call->unmarshall++; 1677 call->unmarshall++;
1676 1678
1677 /* extract the offline message length */ 1679 /* Fall through - and extract the offline message length */
1678 case 4: 1680 case 4:
1679 ret = afs_extract_data(call, true); 1681 ret = afs_extract_data(call, true);
1680 if (ret < 0) 1682 if (ret < 0)
@@ -1689,7 +1691,7 @@ static int afs_deliver_fs_get_volume_status(struct afs_call *call)
1689 afs_extract_begin(call, call->reply[2], size); 1691 afs_extract_begin(call, call->reply[2], size);
1690 call->unmarshall++; 1692 call->unmarshall++;
1691 1693
1692 /* extract the offline message */ 1694 /* Fall through - and extract the offline message */
1693 case 5: 1695 case 5:
1694 _debug("extract offline"); 1696 _debug("extract offline");
1695 ret = afs_extract_data(call, true); 1697 ret = afs_extract_data(call, true);
@@ -1703,7 +1705,7 @@ static int afs_deliver_fs_get_volume_status(struct afs_call *call)
1703 afs_extract_to_tmp(call); 1705 afs_extract_to_tmp(call);
1704 call->unmarshall++; 1706 call->unmarshall++;
1705 1707
1706 /* extract the message of the day length */ 1708 /* Fall through - and extract the message of the day length */
1707 case 6: 1709 case 6:
1708 ret = afs_extract_data(call, true); 1710 ret = afs_extract_data(call, true);
1709 if (ret < 0) 1711 if (ret < 0)
@@ -1718,7 +1720,7 @@ static int afs_deliver_fs_get_volume_status(struct afs_call *call)
1718 afs_extract_begin(call, call->reply[2], size); 1720 afs_extract_begin(call, call->reply[2], size);
1719 call->unmarshall++; 1721 call->unmarshall++;
1720 1722
1721 /* extract the message of the day */ 1723 /* Fall through - and extract the message of the day */
1722 case 7: 1724 case 7:
1723 _debug("extract motd"); 1725 _debug("extract motd");
1724 ret = afs_extract_data(call, false); 1726 ret = afs_extract_data(call, false);
@@ -2016,7 +2018,7 @@ static int afs_deliver_fs_get_capabilities(struct afs_call *call)
2016 afs_extract_to_tmp(call); 2018 afs_extract_to_tmp(call);
2017 call->unmarshall++; 2019 call->unmarshall++;
2018 2020
2019 /* Extract the capabilities word count */ 2021 /* Fall through - and extract the capabilities word count */
2020 case 1: 2022 case 1:
2021 ret = afs_extract_data(call, true); 2023 ret = afs_extract_data(call, true);
2022 if (ret < 0) 2024 if (ret < 0)
@@ -2029,7 +2031,7 @@ static int afs_deliver_fs_get_capabilities(struct afs_call *call)
2029 iov_iter_discard(&call->iter, READ, count * sizeof(__be32)); 2031 iov_iter_discard(&call->iter, READ, count * sizeof(__be32));
2030 call->unmarshall++; 2032 call->unmarshall++;
2031 2033
2032 /* Extract capabilities words */ 2034 /* Fall through - and extract capabilities words */
2033 case 2: 2035 case 2:
2034 ret = afs_extract_data(call, false); 2036 ret = afs_extract_data(call, false);
2035 if (ret < 0) 2037 if (ret < 0)
@@ -2206,6 +2208,7 @@ static int afs_deliver_fs_inline_bulk_status(struct afs_call *call)
2206 call->unmarshall++; 2208 call->unmarshall++;
2207 2209
2208 /* Extract the file status count and array in two steps */ 2210 /* Extract the file status count and array in two steps */
2211 /* Fall through */
2209 case 1: 2212 case 1:
2210 _debug("extract status count"); 2213 _debug("extract status count");
2211 ret = afs_extract_data(call, true); 2214 ret = afs_extract_data(call, true);
@@ -2223,6 +2226,7 @@ static int afs_deliver_fs_inline_bulk_status(struct afs_call *call)
2223 more_counts: 2226 more_counts:
2224 afs_extract_to_buf(call, 21 * sizeof(__be32)); 2227 afs_extract_to_buf(call, 21 * sizeof(__be32));
2225 2228
2229 /* Fall through */
2226 case 2: 2230 case 2:
2227 _debug("extract status array %u", call->count); 2231 _debug("extract status array %u", call->count);
2228 ret = afs_extract_data(call, true); 2232 ret = afs_extract_data(call, true);
@@ -2246,6 +2250,7 @@ static int afs_deliver_fs_inline_bulk_status(struct afs_call *call)
2246 afs_extract_to_tmp(call); 2250 afs_extract_to_tmp(call);
2247 2251
2248 /* Extract the callback count and array in two steps */ 2252 /* Extract the callback count and array in two steps */
2253 /* Fall through */
2249 case 3: 2254 case 3:
2250 _debug("extract CB count"); 2255 _debug("extract CB count");
2251 ret = afs_extract_data(call, true); 2256 ret = afs_extract_data(call, true);
@@ -2262,6 +2267,7 @@ static int afs_deliver_fs_inline_bulk_status(struct afs_call *call)
2262 more_cbs: 2267 more_cbs:
2263 afs_extract_to_buf(call, 3 * sizeof(__be32)); 2268 afs_extract_to_buf(call, 3 * sizeof(__be32));
2264 2269
2270 /* Fall through */
2265 case 4: 2271 case 4:
2266 _debug("extract CB array"); 2272 _debug("extract CB array");
2267 ret = afs_extract_data(call, true); 2273 ret = afs_extract_data(call, true);
@@ -2284,6 +2290,7 @@ static int afs_deliver_fs_inline_bulk_status(struct afs_call *call)
2284 afs_extract_to_buf(call, 6 * sizeof(__be32)); 2290 afs_extract_to_buf(call, 6 * sizeof(__be32));
2285 call->unmarshall++; 2291 call->unmarshall++;
2286 2292
2293 /* Fall through */
2287 case 5: 2294 case 5:
2288 ret = afs_extract_data(call, false); 2295 ret = afs_extract_data(call, false);
2289 if (ret < 0) 2296 if (ret < 0)
diff --git a/fs/afs/misc.c b/fs/afs/misc.c
index bbb1fd51b019..7f2af061ea06 100644
--- a/fs/afs/misc.c
+++ b/fs/afs/misc.c
@@ -131,33 +131,42 @@ void afs_prioritise_error(struct afs_error *e, int error, u32 abort_code)
131 if (e->error == -ETIMEDOUT || 131 if (e->error == -ETIMEDOUT ||
132 e->error == -ETIME) 132 e->error == -ETIME)
133 return; 133 return;
134 /* Fall through */
134 case -ETIMEDOUT: 135 case -ETIMEDOUT:
135 case -ETIME: 136 case -ETIME:
136 if (e->error == -ENOMEM || 137 if (e->error == -ENOMEM ||
137 e->error == -ENONET) 138 e->error == -ENONET)
138 return; 139 return;
140 /* Fall through */
139 case -ENOMEM: 141 case -ENOMEM:
140 case -ENONET: 142 case -ENONET:
141 if (e->error == -ERFKILL) 143 if (e->error == -ERFKILL)
142 return; 144 return;
145 /* Fall through */
143 case -ERFKILL: 146 case -ERFKILL:
144 if (e->error == -EADDRNOTAVAIL) 147 if (e->error == -EADDRNOTAVAIL)
145 return; 148 return;
149 /* Fall through */
146 case -EADDRNOTAVAIL: 150 case -EADDRNOTAVAIL:
147 if (e->error == -ENETUNREACH) 151 if (e->error == -ENETUNREACH)
148 return; 152 return;
153 /* Fall through */
149 case -ENETUNREACH: 154 case -ENETUNREACH:
150 if (e->error == -EHOSTUNREACH) 155 if (e->error == -EHOSTUNREACH)
151 return; 156 return;
157 /* Fall through */
152 case -EHOSTUNREACH: 158 case -EHOSTUNREACH:
153 if (e->error == -EHOSTDOWN) 159 if (e->error == -EHOSTDOWN)
154 return; 160 return;
161 /* Fall through */
155 case -EHOSTDOWN: 162 case -EHOSTDOWN:
156 if (e->error == -ECONNREFUSED) 163 if (e->error == -ECONNREFUSED)
157 return; 164 return;
165 /* Fall through */
158 case -ECONNREFUSED: 166 case -ECONNREFUSED:
159 if (e->error == -ECONNRESET) 167 if (e->error == -ECONNRESET)
160 return; 168 return;
169 /* Fall through */
161 case -ECONNRESET: /* Responded, but call expired. */ 170 case -ECONNRESET: /* Responded, but call expired. */
162 if (e->responded) 171 if (e->responded)
163 return; 172 return;
diff --git a/fs/afs/rxrpc.c b/fs/afs/rxrpc.c
index 2c588f9bbbda..b3a8dfa784c4 100644
--- a/fs/afs/rxrpc.c
+++ b/fs/afs/rxrpc.c
@@ -909,6 +909,7 @@ void afs_send_empty_reply(struct afs_call *call)
909 _debug("oom"); 909 _debug("oom");
910 rxrpc_kernel_abort_call(net->socket, call->rxcall, 910 rxrpc_kernel_abort_call(net->socket, call->rxcall,
911 RX_USER_ABORT, -ENOMEM, "KOO"); 911 RX_USER_ABORT, -ENOMEM, "KOO");
912 /* Fall through */
912 default: 913 default:
913 _leave(" [error]"); 914 _leave(" [error]");
914 return; 915 return;
diff --git a/fs/afs/vlclient.c b/fs/afs/vlclient.c
index c3d9e5a5f67e..b0175b3ef0e8 100644
--- a/fs/afs/vlclient.c
+++ b/fs/afs/vlclient.c
@@ -195,7 +195,9 @@ static int afs_deliver_vl_get_addrs_u(struct afs_call *call)
195 sizeof(struct afs_uuid__xdr) + 3 * sizeof(__be32)); 195 sizeof(struct afs_uuid__xdr) + 3 * sizeof(__be32));
196 call->unmarshall++; 196 call->unmarshall++;
197 197
198 /* Extract the returned uuid, uniquifier, nentries and blkaddrs size */ 198 /* Extract the returned uuid, uniquifier, nentries and
199 * blkaddrs size */
200 /* Fall through */
199 case 1: 201 case 1:
200 ret = afs_extract_data(call, true); 202 ret = afs_extract_data(call, true);
201 if (ret < 0) 203 if (ret < 0)
@@ -220,7 +222,7 @@ static int afs_deliver_vl_get_addrs_u(struct afs_call *call)
220 count = min(call->count, 4U); 222 count = min(call->count, 4U);
221 afs_extract_to_buf(call, count * sizeof(__be32)); 223 afs_extract_to_buf(call, count * sizeof(__be32));
222 224
223 /* Extract entries */ 225 /* Fall through - and extract entries */
224 case 2: 226 case 2:
225 ret = afs_extract_data(call, call->count > 4); 227 ret = afs_extract_data(call, call->count > 4);
226 if (ret < 0) 228 if (ret < 0)
@@ -323,7 +325,7 @@ static int afs_deliver_vl_get_capabilities(struct afs_call *call)
323 afs_extract_to_tmp(call); 325 afs_extract_to_tmp(call);
324 call->unmarshall++; 326 call->unmarshall++;
325 327
326 /* Extract the capabilities word count */ 328 /* Fall through - and extract the capabilities word count */
327 case 1: 329 case 1:
328 ret = afs_extract_data(call, true); 330 ret = afs_extract_data(call, true);
329 if (ret < 0) 331 if (ret < 0)
@@ -336,7 +338,7 @@ static int afs_deliver_vl_get_capabilities(struct afs_call *call)
336 call->unmarshall++; 338 call->unmarshall++;
337 afs_extract_discard(call, count * sizeof(__be32)); 339 afs_extract_discard(call, count * sizeof(__be32));
338 340
339 /* Extract capabilities words */ 341 /* Fall through - and extract capabilities words */
340 case 2: 342 case 2:
341 ret = afs_extract_data(call, false); 343 ret = afs_extract_data(call, false);
342 if (ret < 0) 344 if (ret < 0)
@@ -436,6 +438,7 @@ static int afs_deliver_yfsvl_get_endpoints(struct afs_call *call)
436 /* Extract the returned uuid, uniquifier, fsEndpoints count and 438 /* Extract the returned uuid, uniquifier, fsEndpoints count and
437 * either the first fsEndpoint type or the volEndpoints 439 * either the first fsEndpoint type or the volEndpoints
438 * count if there are no fsEndpoints. */ 440 * count if there are no fsEndpoints. */
441 /* Fall through */
439 case 1: 442 case 1:
440 ret = afs_extract_data(call, true); 443 ret = afs_extract_data(call, true);
441 if (ret < 0) 444 if (ret < 0)
@@ -476,7 +479,7 @@ static int afs_deliver_yfsvl_get_endpoints(struct afs_call *call)
476 afs_extract_to_buf(call, size); 479 afs_extract_to_buf(call, size);
477 call->unmarshall = 2; 480 call->unmarshall = 2;
478 481
479 /* Extract fsEndpoints[] entries */ 482 /* Fall through - and extract fsEndpoints[] entries */
480 case 2: 483 case 2:
481 ret = afs_extract_data(call, true); 484 ret = afs_extract_data(call, true);
482 if (ret < 0) 485 if (ret < 0)
@@ -529,6 +532,7 @@ static int afs_deliver_yfsvl_get_endpoints(struct afs_call *call)
529 * extract the type of the next endpoint when we extract the 532 * extract the type of the next endpoint when we extract the
530 * data of the current one, but this is the first... 533 * data of the current one, but this is the first...
531 */ 534 */
535 /* Fall through */
532 case 3: 536 case 3:
533 ret = afs_extract_data(call, true); 537 ret = afs_extract_data(call, true);
534 if (ret < 0) 538 if (ret < 0)
@@ -555,7 +559,7 @@ static int afs_deliver_yfsvl_get_endpoints(struct afs_call *call)
555 afs_extract_to_buf(call, size); 559 afs_extract_to_buf(call, size);
556 call->unmarshall = 4; 560 call->unmarshall = 4;
557 561
558 /* Extract volEndpoints[] entries */ 562 /* Fall through - and extract volEndpoints[] entries */
559 case 4: 563 case 4:
560 ret = afs_extract_data(call, true); 564 ret = afs_extract_data(call, true);
561 if (ret < 0) 565 if (ret < 0)
@@ -591,7 +595,7 @@ static int afs_deliver_yfsvl_get_endpoints(struct afs_call *call)
591 afs_extract_discard(call, 0); 595 afs_extract_discard(call, 0);
592 call->unmarshall = 5; 596 call->unmarshall = 5;
593 597
594 /* Done */ 598 /* Fall through - Done */
595 case 5: 599 case 5:
596 ret = afs_extract_data(call, false); 600 ret = afs_extract_data(call, false);
597 if (ret < 0) 601 if (ret < 0)
diff --git a/fs/afs/yfsclient.c b/fs/afs/yfsclient.c
index 5aa57929e8c2..4c6096d23a5a 100644
--- a/fs/afs/yfsclient.c
+++ b/fs/afs/yfsclient.c
@@ -544,7 +544,7 @@ static int yfs_deliver_fs_fetch_data64(struct afs_call *call)
544 afs_extract_to_tmp64(call); 544 afs_extract_to_tmp64(call);
545 call->unmarshall++; 545 call->unmarshall++;
546 546
547 /* extract the returned data length */ 547 /* Fall through - and extract the returned data length */
548 case 1: 548 case 1:
549 _debug("extract data length"); 549 _debug("extract data length");
550 ret = afs_extract_data(call, true); 550 ret = afs_extract_data(call, true);
@@ -571,7 +571,7 @@ static int yfs_deliver_fs_fetch_data64(struct afs_call *call)
571 iov_iter_bvec(&call->iter, READ, call->bvec, 1, size); 571 iov_iter_bvec(&call->iter, READ, call->bvec, 1, size);
572 ASSERTCMP(size, <=, PAGE_SIZE); 572 ASSERTCMP(size, <=, PAGE_SIZE);
573 573
574 /* extract the returned data */ 574 /* Fall through - and extract the returned data */
575 case 2: 575 case 2:
576 _debug("extract data %zu/%llu", 576 _debug("extract data %zu/%llu",
577 iov_iter_count(&call->iter), req->remain); 577 iov_iter_count(&call->iter), req->remain);
@@ -598,6 +598,8 @@ static int yfs_deliver_fs_fetch_data64(struct afs_call *call)
598 /* Discard any excess data the server gave us */ 598 /* Discard any excess data the server gave us */
599 iov_iter_discard(&call->iter, READ, req->actual_len - req->len); 599 iov_iter_discard(&call->iter, READ, req->actual_len - req->len);
600 call->unmarshall = 3; 600 call->unmarshall = 3;
601
602 /* Fall through */
601 case 3: 603 case 3:
602 _debug("extract discard %zu/%llu", 604 _debug("extract discard %zu/%llu",
603 iov_iter_count(&call->iter), req->actual_len - req->len); 605 iov_iter_count(&call->iter), req->actual_len - req->len);
@@ -613,7 +615,7 @@ static int yfs_deliver_fs_fetch_data64(struct afs_call *call)
613 sizeof(struct yfs_xdr_YFSCallBack) + 615 sizeof(struct yfs_xdr_YFSCallBack) +
614 sizeof(struct yfs_xdr_YFSVolSync)); 616 sizeof(struct yfs_xdr_YFSVolSync));
615 617
616 /* extract the metadata */ 618 /* Fall through - and extract the metadata */
617 case 4: 619 case 4:
618 ret = afs_extract_data(call, false); 620 ret = afs_extract_data(call, false);
619 if (ret < 0) 621 if (ret < 0)
@@ -629,6 +631,7 @@ static int yfs_deliver_fs_fetch_data64(struct afs_call *call)
629 631
630 call->unmarshall++; 632 call->unmarshall++;
631 633
634 /* Fall through */
632 case 5: 635 case 5:
633 break; 636 break;
634 } 637 }
@@ -1584,7 +1587,7 @@ static int yfs_deliver_fs_get_volume_status(struct afs_call *call)
1584 call->unmarshall++; 1587 call->unmarshall++;
1585 afs_extract_to_buf(call, sizeof(struct yfs_xdr_YFSFetchVolumeStatus)); 1588 afs_extract_to_buf(call, sizeof(struct yfs_xdr_YFSFetchVolumeStatus));
1586 1589
1587 /* extract the returned status record */ 1590 /* Fall through - and extract the returned status record */
1588 case 1: 1591 case 1:
1589 _debug("extract status"); 1592 _debug("extract status");
1590 ret = afs_extract_data(call, true); 1593 ret = afs_extract_data(call, true);
@@ -1596,7 +1599,7 @@ static int yfs_deliver_fs_get_volume_status(struct afs_call *call)
1596 call->unmarshall++; 1599 call->unmarshall++;
1597 afs_extract_to_tmp(call); 1600 afs_extract_to_tmp(call);
1598 1601
1599 /* extract the volume name length */ 1602 /* Fall through - and extract the volume name length */
1600 case 2: 1603 case 2:
1601 ret = afs_extract_data(call, true); 1604 ret = afs_extract_data(call, true);
1602 if (ret < 0) 1605 if (ret < 0)
@@ -1611,7 +1614,7 @@ static int yfs_deliver_fs_get_volume_status(struct afs_call *call)
1611 afs_extract_begin(call, call->reply[2], size); 1614 afs_extract_begin(call, call->reply[2], size);
1612 call->unmarshall++; 1615 call->unmarshall++;
1613 1616
1614 /* extract the volume name */ 1617 /* Fall through - and extract the volume name */
1615 case 3: 1618 case 3:
1616 _debug("extract volname"); 1619 _debug("extract volname");
1617 ret = afs_extract_data(call, true); 1620 ret = afs_extract_data(call, true);
@@ -1624,7 +1627,7 @@ static int yfs_deliver_fs_get_volume_status(struct afs_call *call)
1624 afs_extract_to_tmp(call); 1627 afs_extract_to_tmp(call);
1625 call->unmarshall++; 1628 call->unmarshall++;
1626 1629
1627 /* extract the offline message length */ 1630 /* Fall through - and extract the offline message length */
1628 case 4: 1631 case 4:
1629 ret = afs_extract_data(call, true); 1632 ret = afs_extract_data(call, true);
1630 if (ret < 0) 1633 if (ret < 0)
@@ -1639,7 +1642,7 @@ static int yfs_deliver_fs_get_volume_status(struct afs_call *call)
1639 afs_extract_begin(call, call->reply[2], size); 1642 afs_extract_begin(call, call->reply[2], size);
1640 call->unmarshall++; 1643 call->unmarshall++;
1641 1644
1642 /* extract the offline message */ 1645 /* Fall through - and extract the offline message */
1643 case 5: 1646 case 5:
1644 _debug("extract offline"); 1647 _debug("extract offline");
1645 ret = afs_extract_data(call, true); 1648 ret = afs_extract_data(call, true);
@@ -1653,7 +1656,7 @@ static int yfs_deliver_fs_get_volume_status(struct afs_call *call)
1653 afs_extract_to_tmp(call); 1656 afs_extract_to_tmp(call);
1654 call->unmarshall++; 1657 call->unmarshall++;
1655 1658
1656 /* extract the message of the day length */ 1659 /* Fall through - and extract the message of the day length */
1657 case 6: 1660 case 6:
1658 ret = afs_extract_data(call, true); 1661 ret = afs_extract_data(call, true);
1659 if (ret < 0) 1662 if (ret < 0)
@@ -1668,7 +1671,7 @@ static int yfs_deliver_fs_get_volume_status(struct afs_call *call)
1668 afs_extract_begin(call, call->reply[2], size); 1671 afs_extract_begin(call, call->reply[2], size);
1669 call->unmarshall++; 1672 call->unmarshall++;
1670 1673
1671 /* extract the message of the day */ 1674 /* Fall through - and extract the message of the day */
1672 case 7: 1675 case 7:
1673 _debug("extract motd"); 1676 _debug("extract motd");
1674 ret = afs_extract_data(call, false); 1677 ret = afs_extract_data(call, false);
@@ -1681,6 +1684,7 @@ static int yfs_deliver_fs_get_volume_status(struct afs_call *call)
1681 1684
1682 call->unmarshall++; 1685 call->unmarshall++;
1683 1686
1687 /* Fall through */
1684 case 8: 1688 case 8:
1685 break; 1689 break;
1686 } 1690 }
@@ -2026,6 +2030,7 @@ static int yfs_deliver_fs_inline_bulk_status(struct afs_call *call)
2026 call->unmarshall++; 2030 call->unmarshall++;
2027 2031
2028 /* Extract the file status count and array in two steps */ 2032 /* Extract the file status count and array in two steps */
2033 /* Fall through */
2029 case 1: 2034 case 1:
2030 _debug("extract status count"); 2035 _debug("extract status count");
2031 ret = afs_extract_data(call, true); 2036 ret = afs_extract_data(call, true);
@@ -2043,6 +2048,7 @@ static int yfs_deliver_fs_inline_bulk_status(struct afs_call *call)
2043 more_counts: 2048 more_counts:
2044 afs_extract_to_buf(call, sizeof(struct yfs_xdr_YFSFetchStatus)); 2049 afs_extract_to_buf(call, sizeof(struct yfs_xdr_YFSFetchStatus));
2045 2050
2051 /* Fall through */
2046 case 2: 2052 case 2:
2047 _debug("extract status array %u", call->count); 2053 _debug("extract status array %u", call->count);
2048 ret = afs_extract_data(call, true); 2054 ret = afs_extract_data(call, true);
@@ -2066,6 +2072,7 @@ static int yfs_deliver_fs_inline_bulk_status(struct afs_call *call)
2066 afs_extract_to_tmp(call); 2072 afs_extract_to_tmp(call);
2067 2073
2068 /* Extract the callback count and array in two steps */ 2074 /* Extract the callback count and array in two steps */
2075 /* Fall through */
2069 case 3: 2076 case 3:
2070 _debug("extract CB count"); 2077 _debug("extract CB count");
2071 ret = afs_extract_data(call, true); 2078 ret = afs_extract_data(call, true);
@@ -2082,6 +2089,7 @@ static int yfs_deliver_fs_inline_bulk_status(struct afs_call *call)
2082 more_cbs: 2089 more_cbs:
2083 afs_extract_to_buf(call, sizeof(struct yfs_xdr_YFSCallBack)); 2090 afs_extract_to_buf(call, sizeof(struct yfs_xdr_YFSCallBack));
2084 2091
2092 /* Fall through */
2085 case 4: 2093 case 4:
2086 _debug("extract CB array"); 2094 _debug("extract CB array");
2087 ret = afs_extract_data(call, true); 2095 ret = afs_extract_data(call, true);
@@ -2104,6 +2112,7 @@ static int yfs_deliver_fs_inline_bulk_status(struct afs_call *call)
2104 afs_extract_to_buf(call, sizeof(struct yfs_xdr_YFSVolSync)); 2112 afs_extract_to_buf(call, sizeof(struct yfs_xdr_YFSVolSync));
2105 call->unmarshall++; 2113 call->unmarshall++;
2106 2114
2115 /* Fall through */
2107 case 5: 2116 case 5:
2108 ret = afs_extract_data(call, false); 2117 ret = afs_extract_data(call, false);
2109 if (ret < 0) 2118 if (ret < 0)
@@ -2114,6 +2123,7 @@ static int yfs_deliver_fs_inline_bulk_status(struct afs_call *call)
2114 2123
2115 call->unmarshall++; 2124 call->unmarshall++;
2116 2125
2126 /* Fall through */
2117 case 6: 2127 case 6:
2118 break; 2128 break;
2119 } 2129 }