linux/fs/ocfs2
Junxiao Bi bd99ff4dc9 ocfs2: change slot number type s16 to u16
commit 38d51b2dd1 upstream.

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: 9277f8334f ("ocfs2: fix value of OCFS2_INVALID_SLOT")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Reviewed-by: Gang He <ghe@suse.com>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Jun Piao <piaojun@huawei.com>
Cc: <stable@vger.kernel.org>
Link: http://lkml.kernel.org/r/20200627001259.19757-1-junxiao.bi@oracle.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-21 13:05:26 +02:00
..
cluster
dlm ocfs2: make local header paths relative to C files 2020-02-24 08:37:00 +01:00
dlmfs dlmfs_file_write(): fix the bogosity in handling non-zero *ppos 2020-05-06 08:15:09 +02:00
Kconfig
Makefile
acl.c ocfs2: fix passing zero to 'PTR_ERR' warning 2020-01-04 19:18:30 +01:00
acl.h
alloc.c ocfs2: no need try to truncate file beyond i_size 2020-04-17 10:50:21 +02:00
alloc.h
aops.c fs: ocfs2: fix a possible null-pointer dereference in ocfs2_write_end_nolock() 2019-10-07 15:47:19 -07:00
aops.h
blockcheck.c
blockcheck.h
buffer_head_io.c
buffer_head_io.h
dcache.c
dcache.h
dir.c fs/ocfs2/dir.c: remove set but not used variables 2019-09-24 15:54:07 -07:00
dir.h
dlmglue.c ocfs2: fix unbalanced locking 2020-08-19 08:16:21 +02:00
dlmglue.h
export.c
export.h
extent_map.c ocfs2: delete unnecessary checks before brelse() 2019-09-24 15:54:07 -07:00
extent_map.h
file.c ocfs2: fix oops when writing cloned file 2020-02-11 04:35:42 -08:00
file.h
filecheck.c
filecheck.h
heartbeat.c
heartbeat.h
inode.c ocfs2: fix spelling mistake "ambigous" -> "ambiguous" 2019-09-24 15:54:07 -07:00
inode.h
ioctl.c fs: ocfs2: fix a possible null-pointer dereference in ocfs2_info_scan_inode_alloc() 2019-10-07 15:47:19 -07:00
ioctl.h
journal.c ocfs2: call journal flush to mark journal as empty after journal recovery when mount 2020-01-17 19:49:08 +01:00
journal.h ocfs2: fix a NULL pointer dereference when call ocfs2_update_inode_fsync_trans() 2020-02-24 08:37:00 +01:00
localalloc.c ocfs2: fix panic due to ocfs2_wq is null 2019-10-19 06:32:32 -04:00
localalloc.h
locks.c
locks.h
mmap.c
mmap.h
move_extents.c
move_extents.h
namei.c fs/ocfs2/namei.c: remove set but not used variables 2019-09-24 15:54:07 -07:00
namei.h
ocfs1_fs_compat.h
ocfs2.h ocfs2: change slot number type s16 to u16 2020-08-21 13:05:26 +02:00
ocfs2_fs.h ocfs2: fix value of OCFS2_INVALID_SLOT 2020-06-30 15:37:09 -04:00
ocfs2_ioctl.h
ocfs2_lockid.h
ocfs2_lockingver.h
ocfs2_trace.h
quota.h
quota_global.c quota: Check that quota is not dirty before release 2019-12-17 19:56:43 +01:00
quota_local.c
refcounttree.c
refcounttree.h
reservations.c
reservations.h
resize.c
resize.h
slot_map.c
slot_map.h
stack_o2cb.c
stack_user.c
stackglue.c
stackglue.h
suballoc.c ocfs2: change slot number type s16 to u16 2020-08-21 13:05:26 +02:00
suballoc.h
super.c ocfs2: change slot number type s16 to u16 2020-08-21 13:05:26 +02:00
super.h
symlink.c
symlink.h
sysfile.c
sysfile.h
uptodate.c
uptodate.h
xattr.c Revert "fs: ocfs2: fix possible null-pointer dereferences in ocfs2_xa_prepare_entry()" 2019-11-22 09:11:18 -08:00
xattr.h