alistair23-linux/fs/ext4
Arnd Bergmann 1e83bc8156 ext4: use BUG() instead of BUG_ON(1)
BUG_ON(1) leads to bogus warnings from clang when
CONFIG_PROFILE_ANNOTATED_BRANCHES is set:

 fs/ext4/inode.c:544:4: error: variable 'retval' is used uninitialized whenever 'if' condition is false
      [-Werror,-Wsometimes-uninitialized]
                        BUG_ON(1);
                        ^~~~~~~~~
 include/asm-generic/bug.h:61:36: note: expanded from macro 'BUG_ON'
                                   ^~~~~~~~~~~~~~~~~~~
 include/linux/compiler.h:48:23: note: expanded from macro 'unlikely'
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 fs/ext4/inode.c:591:6: note: uninitialized use occurs here
        if (retval > 0 && map->m_flags & EXT4_MAP_MAPPED) {
            ^~~~~~
 fs/ext4/inode.c:544:4: note: remove the 'if' if its condition is always true
                        BUG_ON(1);
                        ^
 include/asm-generic/bug.h:61:32: note: expanded from macro 'BUG_ON'
                               ^
 fs/ext4/inode.c:502:12: note: initialize the variable 'retval' to silence this warning

Change it to BUG() so clang can see that this code path can never
continue.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Jan Kara <jack@suse.cz>
2019-04-07 12:24:43 -04:00
..
acl.c ext4: compare old and new mode before setting update_mode flag 2018-12-10 00:22:38 -05:00
acl.h
balloc.c ext4: use ext4_warning() for sb_getblk failure 2018-08-01 12:02:31 -04:00
bitmap.c
block_validity.c
dir.c fscrypt: remove filesystem specific build config option 2019-01-23 23:56:43 -05:00
ext4.h ext4: remove incorrect comment for NEXT_ORPHAN() 2019-04-06 18:53:05 -04:00
ext4_extents.h ext4: adjust reserved cluster count when removing extents 2018-10-01 14:25:08 -04:00
ext4_jbd2.c
ext4_jbd2.h Miscellaneous ext4 bug fixes for 5.1. 2019-03-24 13:41:37 -07:00
extents.c A large number of bug fixes and cleanups. One new feature to allow 2019-03-12 15:03:21 -07:00
extents_status.c ext4: use BUG() instead of BUG_ON(1) 2019-04-07 12:24:43 -04:00
extents_status.h ext4: reduce reserved cluster count by number of allocated clusters 2018-10-01 14:24:08 -04:00
file.c ext4: fix data corruption caused by unaligned direct AIO 2019-03-14 23:20:25 -04:00
fsmap.c
fsmap.h
fsync.c Revert "ext4: use ext4_write_inode() when fsyncing w/o a journal" 2019-01-31 23:41:11 -05:00
hash.c ext4: annotate implicit fall throughs 2019-02-21 10:49:53 -05:00
ialloc.c ext4: use IS_ENCRYPTED() to check encryption status 2019-01-23 23:56:43 -05:00
indirect.c ext4: cleanup bh release code in ext4_ind_remove_space() 2019-03-23 11:56:01 -04:00
inline.c ext4: fix a potential fiemap/page fault deadlock w/ inline_data 2018-12-25 00:56:33 -05:00
inode.c ext4: use BUG() instead of BUG_ON(1) 2019-04-07 12:24:43 -04:00
ioctl.c Miscellaneous ext4 bug fixes for 5.1. 2019-03-24 13:41:37 -07:00
Kconfig A large number of bug fixes and cleanups. One new feature to allow 2019-03-12 15:03:21 -07:00
Makefile
mballoc.c ext4: make sanity check in mballoc more strict 2019-04-06 18:33:06 -04:00
mballoc.h
migrate.c ext4: clean up indentation issues, remove extraneous tabs 2018-12-04 00:16:44 -05:00
mmp.c ext4: don't mark mmp buffer head dirty 2018-09-15 17:11:25 -04:00
move_extent.c ext4: use IS_ENCRYPTED() to check encryption status 2019-01-23 23:56:43 -05:00
namei.c fscrypt: remove filesystem specific build config option 2019-01-23 23:56:43 -05:00
page-io.c A large number of bug fixes and cleanups. One new feature to allow 2019-03-12 15:03:21 -07:00
readpage.c ext4: fix prefetchw of NULL page 2019-04-07 11:54:27 -04:00
resize.c ext4: report real fs size after failed resize 2019-03-15 00:22:28 -04:00
super.c Miscellaneous ext4 bug fixes for 5.1. 2019-03-24 13:41:37 -07:00
symlink.c
sysfs.c A large number of bug fixes and cleanups. One new feature to allow 2019-03-12 15:03:21 -07:00
truncate.h ext4: handle layout changes to pinned DAX mappings 2018-07-29 17:00:22 -04:00
xattr.c ext4: fix some error pointer dereferences 2019-02-21 11:17:34 -05:00
xattr.h
xattr_security.c
xattr_trusted.c
xattr_user.c