linux/fs/hfs
Arnd Bergmann 55d1cbbbb2 hfs/hfsplus: use WARN_ON for sanity check
gcc warns about a couple of instances in which a sanity check exists but
the author wasn't sure how to react to it failing, which makes it look
like a possible bug:

  fs/hfsplus/inode.c: In function 'hfsplus_cat_read_inode':
  fs/hfsplus/inode.c:503:37: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
    503 |                         /* panic? */;
        |                                     ^
  fs/hfsplus/inode.c:524:37: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
    524 |                         /* panic? */;
        |                                     ^
  fs/hfsplus/inode.c: In function 'hfsplus_cat_write_inode':
  fs/hfsplus/inode.c:582:37: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
    582 |                         /* panic? */;
        |                                     ^
  fs/hfsplus/inode.c:608:37: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
    608 |                         /* panic? */;
        |                                     ^
  fs/hfs/inode.c: In function 'hfs_write_inode':
  fs/hfs/inode.c:464:37: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
    464 |                         /* panic? */;
        |                                     ^
  fs/hfs/inode.c:485:37: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
    485 |                         /* panic? */;
        |                                     ^

panic() is probably not the correct choice here, but a WARN_ON
seems appropriate and avoids the compile-time warning.

Link: https://lkml.kernel.org/r/20210927102149.1809384-1-arnd@kernel.org
Link: https://lore.kernel.org/all/20210322223249.2632268-1-arnd@kernel.org/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-11-09 10:02:52 -08:00
..
attr.c acl: handle idmapped mounts 2021-01-24 14:27:17 +01:00
bfind.c hfs: add lock nesting notation to hfs_find_init 2021-07-15 10:13:49 -07:00
bitmap.c
bnode.c hfs: fix high memory mapping in hfs_bnode_read 2021-07-15 10:13:49 -07:00
brec.c hfs: fix BUG on bnode parent update 2018-10-31 08:54:13 -07:00
btree.c hfs: do not free node before using 2018-11-30 14:56:14 -08:00
btree.h hfs: add lock nesting notation to hfs_find_init 2021-07-15 10:13:49 -07:00
catalog.c hfs: prevent btree data loss on ENOSPC 2018-10-31 08:54:13 -07:00
dir.c fs: make helpers idmap mount aware 2021-01-24 14:27:20 +01:00
extent.c fs/hfs/extent.c: fix array out of bounds read of array extent 2018-10-31 08:54:13 -07:00
hfs_fs.h fs: make helpers idmap mount aware 2021-01-24 14:27:20 +01:00
hfs.h
inode.c hfs/hfsplus: use WARN_ON for sanity check 2021-11-09 10:02:52 -08:00
Kconfig docs: filesystems: fix renamed references 2020-04-20 15:45:22 -06:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mdb.c hfs: stop using ioctl_by_bdev 2020-05-09 16:15:13 -06:00
part_tbl.c
string.c
super.c hfs: add missing clean-up in hfs_fill_super 2021-07-15 10:13:49 -07:00
sysdep.c
trans.c