linux-stable/fs/overlayfs
Arnd Bergmann 0319ef1d40 ovl: fix bogus -Wmaybe-unitialized warning
[ Upstream commit 1dac6f5b0e ]

gcc gets a bit confused by the logic in ovl_setup_trap() and
can't figure out whether the local 'trap' variable in the caller
was initialized or not:

fs/overlayfs/super.c: In function 'ovl_fill_super':
fs/overlayfs/super.c:1333:4: error: 'trap' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    iput(trap);
    ^~~~~~~~~~
fs/overlayfs/super.c:1312:17: note: 'trap' was declared here

Reword slightly to make it easier for the compiler to understand.

Fixes: 146d62e5a5 ("ovl: detect overlapping layers")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-06-25 11:35:52 +08:00
..
copy_up.c ovl: fix missing upper fs freeze protection on copy up for ioctl 2019-05-25 18:23:30 +02:00
dir.c ovl: relax WARN_ON() for overlapping layers use case 2019-05-31 06:46:03 -07:00
export.c ovl: fix decode of dir file handle with multi lower layers 2018-12-19 19:19:51 +01:00
file.c ovl: fix wrong flags check in FS_IOC_FS[SG]ETXATTR ioctls 2019-06-25 11:35:52 +08:00
inode.c ovl: detect overlapping layers 2019-06-25 11:35:52 +08:00
Kconfig ovl: Provide a mount option metacopy=on/off for metadata copyup 2018-07-20 09:56:06 +02:00
Makefile ovl: stack file ops 2018-07-18 15:44:41 +02:00
namei.c ovl: detect overlapping layers 2019-06-25 11:35:52 +08:00
overlayfs.h ovl: detect overlapping layers 2019-06-25 11:35:52 +08:00
ovl_entry.h ovl: detect overlapping layers 2019-06-25 11:35:52 +08:00
readdir.c ovl: fix wrong use of impure dir cache in ovl_iterate() 2018-07-17 16:04:34 +02:00
super.c ovl: fix bogus -Wmaybe-unitialized warning 2019-06-25 11:35:52 +08:00
util.c ovl: detect overlapping layers 2019-06-25 11:35:52 +08:00