aio: fix off-by-one error in indexed xlat lookup
* aio.c (tprint_lio_opcode): Decrement xlat size by one to account for XLAT_END as other users of indexed xlats do. Fixes: v4.24~71 "aio: print IOCB_CMD_* using xlat"
This commit is contained in:
parent
b2c63fa897
commit
986a55423e
2
aio.c
2
aio.c
@ -50,7 +50,7 @@ tprint_lio_opcode(unsigned int cmd)
|
||||
[IOCB_CMD_PWRITEV] = SUB_VECTOR,
|
||||
};
|
||||
|
||||
printxval_indexn_ex(ARRSZ_PAIR(aio_cmds), cmd, "IOCB_CMD_???",
|
||||
printxval_indexn_ex(ARRSZ_PAIR(aio_cmds) - 1, cmd, "IOCB_CMD_???",
|
||||
XLAT_STYLE_FMT_U);
|
||||
|
||||
return cmd < ARRAY_SIZE(subs) ? subs[cmd] : SUB_NONE;
|
||||
|
Loading…
Reference in New Issue
Block a user