diff options
| author | Junxiao Bi <[email protected]> | 2020-08-07 06:18:02 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2020-08-07 18:33:21 +0000 |
| commit | 38d51b2dd171ad973afc1f5faab825ed05a2d5e9 (patch) | |
| tree | 8c7e4bf2035706c7e331dfef2908a5aeb69f1476 /lib/mpi/mpiutil.c | |
| parent | ocfs2: suballoc.h: delete a duplicated word (diff) | |
| download | kernel-38d51b2dd171ad973afc1f5faab825ed05a2d5e9.tar.gz kernel-38d51b2dd171ad973afc1f5faab825ed05a2d5e9.zip | |
ocfs2: change slot number type s16 to u16
Dan Carpenter reported the following static checker warning.
fs/ocfs2/super.c:1269 ocfs2_parse_options() warn: '(-1)' 65535 can't fit into 32767 'mopt->slot'
fs/ocfs2/suballoc.c:859 ocfs2_init_inode_steal_slot() warn: '(-1)' 65535 can't fit into 32767 'osb->s_inode_steal_slot'
fs/ocfs2/suballoc.c:867 ocfs2_init_meta_steal_slot() warn: '(-1)' 65535 can't fit into 32767 'osb->s_meta_steal_slot'
That's because OCFS2_INVALID_SLOT is (u16)-1. Slot number in ocfs2 can be
never negative, so change s16 to u16.
Fixes: 9277f8334ffc ("ocfs2: fix value of OCFS2_INVALID_SLOT")
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Junxiao Bi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reviewed-by: Joseph Qi <[email protected]>
Reviewed-by: Gang He <[email protected]>
Cc: Mark Fasheh <[email protected]>
Cc: Joel Becker <[email protected]>
Cc: Junxiao Bi <[email protected]>
Cc: Changwei Ge <[email protected]>
Cc: Jun Piao <[email protected]>
Cc: <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions
