linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] aio: fix missing break in switch statement
@ 2018-05-30 18:04 Colin King
  2018-05-30 18:11 ` Darrick J. Wong
  2018-05-31 16:39 ` Christoph Hellwig
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2018-05-30 18:04 UTC (permalink / raw)
  To: Benjamin LaHaise, Christoph Hellwig, linux-fsdevel
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The addition of the IOCB_CMD_POLL command removed the break
statement for the IOCM_CMD_FDSYNC. From my understanding, this
should not have been removed as the fall-through does not seem
to make sense.  Fix this by adding the break back again.

Detected by CoverityScan, CID#1469469 ("Missing break in switch")

Fixes: 2c14fa838cbe ("aio: implement IOCB_CMD_POLL")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 fs/aio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/aio.c b/fs/aio.c
index 8274d09d44a2..e0b2f183fa1c 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1785,6 +1785,7 @@ static int io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb,
 		break;
 	case IOCB_CMD_FDSYNC:
 		ret = aio_fsync(&req->fsync, iocb, true);
+		break;
 	case IOCB_CMD_POLL:
 		ret = aio_poll(req, iocb);
 		break;
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-31 16:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-30 18:04 [PATCH][next] aio: fix missing break in switch statement Colin King
2018-05-30 18:11 ` Darrick J. Wong
2018-05-31 16:39 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).