linux-stable/fs/ext4
Theodore Ts'o acd29971d6 ext4: don't use the orphan list when migrating an inode
commit 6eeaf88fd5 upstream.

We probably want to remove the indirect block to extents migration
feature after a deprecation window, but until then, let's fix a
potential data loss problem caused by the fact that we put the
tmp_inode on the orphan list.  In the unlikely case where we crash and
do a journal recovery, the data blocks belonging to the inode being
migrated are also represented in the tmp_inode on the orphan list ---
and so its data blocks will get marked unallocated, and available for
reuse.

Instead, stop putting the tmp_inode on the oprhan list.  So in the
case where we crash while migrating the inode, we'll leak an inode,
which is not a disaster.  It will be easily fixed the next time we run
fsck, and it's better than potentially having blocks getting claimed
by two different files, and losing data as a result.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-27 09:00:59 +01:00
..
acl.c
acl.h
balloc.c ext4: fix potential race between online resizing and write operations 2020-03-11 18:02:42 +01:00
bitmap.c
block_validity.c ext4: check journal inode extents more carefully 2021-03-24 11:04:54 +01:00
dir.c ext4: fix potential infinite loop in ext4_dx_readdir() 2021-10-06 15:05:09 +02:00
ext4.h ext4: check journal inode extents more carefully 2021-03-24 11:04:54 +01:00
ext4_extents.h ext4: fix EXT_MAX_EXTENT/INDEX to check for zeroed eh_max 2020-06-20 10:25:15 +02:00
ext4_jbd2.c
ext4_jbd2.h ext4: use jbd2_inode dirty range scoping 2019-07-31 07:28:47 +02:00
extents.c ext4: fix kernel infoleak via ext4_extent_header 2021-07-20 16:17:28 +02:00
extents_status.c ext4: remove check for zero nr_to_scan in ext4_es_scan() 2021-07-20 16:17:28 +02:00
extents_status.h
file.c ext4: fix ext4_dax_read/write inode locking sequence for IOCB_NOWAIT 2020-02-28 16:35:55 +01:00
fsmap.c ext4: limit entries returned when counting fsmap records 2020-10-29 09:07:11 +01:00
fsmap.h
fsync.c ext4: fix race between ext4_sync_parent() and rename() 2020-06-20 10:25:15 +02:00
hash.c
ialloc.c ext4: fix avefreec in find_group_orlov 2021-07-20 16:17:29 +02:00
indirect.c ext4: check journal inode extents more carefully 2021-03-24 11:04:54 +01:00
inline.c ext4: fix race writing to an inline_data file while its xattrs are changing 2021-09-22 11:45:14 +02:00
inode.c ext4: fix bh ref count on error paths 2021-04-07 12:47:00 +02:00
ioctl.c ext4: avoid trim error on fs with small groups 2022-01-27 09:00:52 +01:00
Kconfig
Makefile
mballoc.c ext4: avoid trim error on fs with small groups 2022-01-27 09:00:52 +01:00
mballoc.h
migrate.c ext4: don't use the orphan list when migrating an inode 2022-01-27 09:00:59 +01:00
mmp.c ext4: don't assume that mmp_nodename/bdevname have NUL 2020-02-28 16:35:52 +01:00
move_extent.c ext4: use jbd2_inode dirty range scoping 2019-07-31 07:28:47 +02:00
namei.c ext4: fix potential htree corruption when growing large_dir directories 2021-08-15 13:03:31 +02:00
page-io.c ext4: fix deadlock allocating crypto bounce page from mempool 2020-02-14 16:32:19 -05:00
readpage.c
resize.c ext4: fix error handling code in add_new_gdb 2020-11-05 11:07:04 +01:00
super.c ext4: Fix BUG_ON in ext4_bread when write quota data 2022-01-27 09:00:59 +01:00
symlink.c
sysfs.c ext4: sysfs: print ext4_super_block fields as little-endian 2018-09-05 09:26:36 +02:00
truncate.h
xattr.c ext4: add reclaim checks to xattr code 2021-03-30 14:40:12 +02:00
xattr.h
xattr_security.c
xattr_trusted.c
xattr_user.c