nilfs2: replace WARN_ONs by nilfs_error for checkpoint acquisition failure
Ryusuke Konishi authored
commit 723ac751 upstream.

If creation or finalization of a checkpoint fails due to anomalies in the
checkpoint metadata on disk, a kernel warning is generated.

This patch replaces the WARN_ONs by nilfs_error, so that a kernel, booted
with panic_on_warn, does not panic.  A nilfs_error is appropriate here to
handle the abnormal filesystem condition.

This also replaces the detected error codes with an I/O error so that
neither of the internal error codes is returned to callers.

Link: https://lkml.kernel.org/r/20220929123330.19658-1-konishi.ryusuke@gmail.com

Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@gmail.com>
Reported-by: syzbot+fbb3e0b24e8dae5a16ee@syzkaller.appspotmail.com
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
259c0f68
Name Last commit Last update
Documentation ARM: dts: fix Moxa SDIO 'compatible', remove 'sdhci' misnomer
LICENSES LICENSES: Rename other to deprecated
arch arch: um: Mark the stack non-executable to fix a binutils warning
block blk-mq: don't create hctx debugfs dir until q->debugfs_dir is created
certs certs/blacklist_hashes.c: fix const confusion in certs blacklist
crypto crypto: drbg - make reseeding from get_random_bytes() synchronous
drivers rpmsg: qcom: glink: replace strncpy() with strscpy_pad()
fs nilfs2: replace WARN_ONs by nilfs_error for checkpoint acquisition failure
include net/ieee802154: fix uninit value bug in dgram_sendmsg
init random: handle latent entropy and command line from random_init()
ipc ipc/mqueue: use get_tree_nodev() in mqueue_get_tree()
kernel workqueue: don't skip lockdep work dependency in cancel_work_sync()
lib lib/vdso: Mark do_hres() and do_coarse() as __always_inline
mm mm: pagewalk: Fix race between unmap and page walker
net net/ieee802154: fix uninit value bug in dgram_sendmsg
samples samples/kretprobes: Fix return value if register_kretprobe() failed
scripts Makefile.extrawarn: Move -Wcast-function-type-strict to W=1
security apparmor: Fix memleak in aa_simple_write_to_buffer()
sound ALSA: hda/realtek: Enable 4-speaker output Dell Precision 5530 laptop
tools perf tools: Fixup get_current_dir_name() compilation
usr initramfs: restore default compression behavior
virt KVM: Add infrastructure and macro to mark VM as bugged
.clang-format clang-format: Update with the latest for_each macro list
.cocciconfig scripts: add Linux .cocciconfig for coccinelle
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl
.gitattributes .gitattributes: set git diff driver for C source code files
.gitignore Merge tag 'modules-for-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux
.mailmap Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
COPYING COPYING: use the new text with points to the license files
CREDITS MAINTAINERS: Remove Simon as Renesas SoC Co-Maintainer
Kbuild kbuild: do not descend to ./Kbuild when cleaning
Kconfig docs: kbuild: convert docs to ReST and rename to *.rst
MAINTAINERS MAINTAINERS: add Chandan as xfs maintainer for 5.4.y
Makefile Linux 5.4.217
README Drop all 00-INDEX files from Documentation/
Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.