android_kernel_oneplus_msm8998/fs/gfs2
Arnd Bergmann d39cb4a597 gfs2: avoid uninitialized variable warning
commit 67893f12e5374bbcaaffbc6e570acbc2714ea884 upstream.

We get a bogus warning about a potential uninitialized variable
use in gfs2, because the compiler does not figure out that we
never use the leaf number if get_leaf_nr() returns an error:

fs/gfs2/dir.c: In function 'get_first_leaf':
fs/gfs2/dir.c:802:9: warning: 'leaf_no' may be used uninitialized in this function [-Wmaybe-uninitialized]
fs/gfs2/dir.c: In function 'dir_split_leaf':
fs/gfs2/dir.c:1021:8: warning: 'leaf_no' may be used uninitialized in this function [-Wmaybe-uninitialized]

Changing the 'if (!error)' to 'if (!IS_ERR_VALUE(error))' is
sufficient to let gcc understand that this is exactly the same
condition as in IS_ERR() so it can optimize the code path enough
to understand it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-30 05:49:28 +02:00
..
acl.c posix_acl: Clear SGID bit when setting file permissions 2016-10-31 04:13:58 -06:00
acl.h
aops.c
bmap.c
bmap.h
dentry.c
dir.c gfs2: avoid uninitialized variable warning 2017-04-30 05:49:28 +02:00
dir.h
export.c
file.c GFS2: merge window 2015-11-09 18:01:23 -08:00
gfs2.h
glock.c gfs2: Add missing rcu locking for glock lookup 2017-03-12 06:37:29 +01:00
glock.h gfs2: Remove gl_spin define 2015-10-29 12:57:48 -05:00
glops.c gfs2: Remove gl_spin define 2015-10-29 12:57:48 -05:00
glops.h
incore.h gfs2: Avoid alignment hole in struct lm_lockname 2017-03-26 12:13:19 +02:00
inode.c
inode.h
Kconfig
lock_dlm.c remove abs64() 2015-11-09 15:11:24 -08:00
log.c
log.h
lops.c GFS2: merge window 2015-09-11 12:23:51 -07:00
lops.h
main.c gfs2: Remove gl_spin define 2015-10-29 12:57:48 -05:00
Makefile
meta_io.c
meta_io.h
ops_fstype.c GFS2: Set s_mode before parsing mount options 2015-09-23 08:45:43 -05:00
quota.c
quota.h
recovery.c
recovery.h
rgrp.c GFS2: Fix rgrp end rounding problem for bsize < page size 2015-11-09 09:38:02 -06:00
rgrp.h
super.c
super.h
sys.c
sys.h
trace_gfs2.h
trans.c gfs2: Add missing else in trans_add_meta/data 2015-10-01 12:00:59 -05:00
trans.h
util.c
util.h
xattr.c xattr handlers: Pass handler to operations instead of flags 2015-11-13 20:34:32 -05:00
xattr.h