linux/fs/f2fs
Christian Brauner 1afe9e7da8
f2fs: fix freezing filesystem during resize
Using FREEZE_HOLDER_USERSPACE has two consequences:

(1) If userspace freezes the filesystem after mnt_drop_write_file() but
    before freeze_super() was called filesystem resizing will fail
    because the freeze isn't marked as nestable.

(2) If the kernel has successfully frozen the filesystem via
    FREEZE_HOLDER_USERSPACE userspace can simply undo it by using the
    FITHAW ioctl.

Fix both issues by using FREEZE_HOLDER_KERNEL. It will nest with
FREEZE_HOLDER_USERSPACE and cannot be undone by userspace.

And it is the correct thing to do because the kernel temporarily freezes
the filesystem.

Signed-off-by: Christian Brauner <brauner@kernel.org>
History 2025-05-09 12:41:24 +02:00
..
acl.c f2fs: Use struct_size() to improve f2fs_acl_clone() 2024-10-14 20:04:57 +00:00
acl.h fs: port ->set_acl() to pass mnt_idmap 2023-01-19 09:24:27 +01:00
checkpoint.c f2fs: Remove f2fs_write_meta_page() 2025-03-11 19:37:57 +00:00
compress.c f2fs: fix potential deadloop in prepare_compress_overwrite() 2025-03-04 00:47:13 +00:00
data.c f2fs-for-6.15-rc1 2025-03-27 12:55:54 -07:00
debug.c f2fs: keep POSIX_FADV_NOREUSE ranges 2025-02-13 17:58:31 +00:00
dir.c f2fs: do sanity check on inode footer in f2fs_get_inode_page() 2025-03-11 03:25:53 +00:00
extent_cache.c f2fs: add a sysfs node to limit max read extent count per-inode 2024-11-23 15:48:13 +00:00
f2fs.h f2fs: make LAZYTIME a mount option flag 2025-03-13 18:16:06 +00:00
file.c f2fs: fix to avoid running out of free segments 2025-03-12 14:23:36 +00:00
gc.c f2fs: fix freezing filesystem during resize 2025-05-09 12:41:24 +02:00
gc.h f2fs: decrease spare area for pinned files for zoned devices 2024-11-01 01:19:00 +00:00
hash.c f2fs: don't use casefolded comparison for "." and ".." 2022-05-17 11:19:23 -07:00
inline.c f2fs: do sanity check on inode footer in f2fs_get_inode_page() 2025-03-11 03:25:53 +00:00
inode.c f2fs: fix to avoid atomicity corruption of atomic file 2025-03-17 17:38:33 +00:00
iostat.c f2fs: add async reset zone command support 2023-06-12 13:04:09 -07:00
iostat.h f2fs: use iostat_lat_type directly as a parameter in the iostat_update_and_unbind_ctx() 2023-02-07 10:39:28 -08:00
Kconfig f2fs: switch to using the crc32 library 2024-12-01 17:23:02 -08:00
Makefile f2fs: separate out iostat feature 2021-08-23 10:25:51 -07:00
namei.c f2fs-for-6.15-rc1 2025-03-27 12:55:54 -07:00
node.c f2fs: Remove f2fs_write_node_page() 2025-03-11 19:38:00 +00:00
node.h f2fs: do sanity check on xattr node footer in f2fs_get_xnode_page() 2025-03-11 03:25:53 +00:00
recovery.c f2fs: fix to avoid changing 'check only' behaior of recovery 2025-01-22 21:04:56 +00:00
segment.c f2fs: fix missing discard for active segments 2025-03-18 01:26:06 +00:00
segment.h f2fs: fix to avoid accessing uninitialized curseg 2025-03-11 03:25:53 +00:00
shrinker.c f2fs: add a sysfs entry to reclaim POSIX_FADV_NOREUSE pages 2025-02-13 17:58:36 +00:00
super.c f2fs: fix to avoid atomicity corruption of atomic file 2025-03-17 17:38:33 +00:00
sysfs.c f2fs: add carve_out sysfs node 2025-03-13 18:15:59 +00:00
verity.c f2fs-6.12-rc1 2024-09-24 15:12:38 -07:00
xattr.c f2fs: do sanity check on xattr node footer in f2fs_get_xnode_page() 2025-03-11 03:25:53 +00:00
xattr.h f2fs: move f2fs_xattr_handlers and f2fs_xattr_handler_map to .rodata 2023-10-09 16:24:18 +02:00