linux/fs/f2fs
Jaegeuk Kim 4f99484d27 f2fs: complete checkpoints during remount
Otherwise, pending checkpoints can contribute a race condition to give a
quota warning.

- Thread                      - checkpoint thread
                              add checkpoints to the list
do_remount()
 down_write(&sb->s_umount);
 f2fs_remount()
                              block_operations()
                               down_read_trylock(&sb->s_umount) = 0
 up_write(&sb->s_umount);
                               f2fs_quota_sync()
                                dquot_writeback_dquots()
                                 WARN_ON_ONCE(!rwsem_is_locked(&sb->s_umount));

Or,

do_remount()
 down_write(&sb->s_umount);
 f2fs_remount()
                              create a ckpt thread
                              f2fs_enable_checkpoint() adds checkpoints
			      wait for f2fs_sync_fs()
                              trigger another pending checkpoint
                               block_operations()
                                down_read_trylock(&sb->s_umount) = 0
 up_write(&sb->s_umount);
                                f2fs_quota_sync()
                                 dquot_writeback_dquots()
                                  WARN_ON_ONCE(!rwsem_is_locked(&sb->s_umount));

Cc: stable@vger.kernel.org
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2022-09-12 23:07:20 -07:00
..
acl.c f2fs: support idmapped mounts 2022-02-12 06:20:46 -08:00
acl.h vfs: add rcu argument to ->get_acl() callback 2021-08-18 22:08:24 +02:00
checkpoint.c f2fs: flush pending checkpoints when freezing super 2022-09-12 23:07:12 -07:00
compress.c f2fs-for-6.0 2022-08-08 11:18:31 -07:00
data.c f2fs: iostat: support accounting compressed IO 2022-08-29 21:15:51 -07:00
debug.c f2fs: adjust zone capacity when considering valid block count 2022-07-30 20:16:20 -07:00
dir.c f2fs: don't use casefolded comparison for "." and ".." 2022-05-17 11:19:23 -07:00
extent_cache.c f2fs: support fault injection for f2fs_kmem_cache_alloc() 2021-08-17 11:59:05 -07:00
f2fs.h f2fs: flush pending checkpoints when freezing super 2022-09-12 23:07:12 -07:00
file.c f2fs: iostat: support accounting compressed IO 2022-08-29 21:15:51 -07:00
gc.c f2fs: remove gc_urgent_high_limited for cleanup 2022-08-29 21:15:51 -07:00
gc.h f2fs: remove redundant code for gc condition 2022-07-30 20:16:20 -07:00
hash.c f2fs: don't use casefolded comparison for "." and ".." 2022-05-17 11:19:23 -07:00
inline.c f2fs: use memcpy_{to,from}_page() where possible 2022-08-29 21:15:51 -07:00
inode.c f2fs: clean up f2fs_abort_atomic_write() 2022-08-05 04:20:02 -07:00
iostat.c f2fs: iostat: support accounting compressed IO 2022-08-29 21:15:51 -07:00
iostat.h f2fs: iostat: support accounting compressed IO 2022-08-29 21:15:51 -07:00
Kconfig f2fs: introduce F2FS_UNFAIR_RWSEM to support unfair rwsem 2022-03-04 09:15:53 -08:00
Makefile f2fs: separate out iostat feature 2021-08-23 10:25:51 -07:00
namei.c f2fs: attach inline_data after setting compression 2022-06-19 15:16:10 -07:00
node.c f2fs: iostat: support accounting compressed IO 2022-08-29 21:15:51 -07:00
node.h f2fs: change the current atomic write way 2022-05-12 10:14:03 -07:00
recovery.c attr: port attribute changes to new types 2022-06-26 18:18:56 +02:00
segment.c f2fs: iostat: support accounting compressed IO 2022-08-29 21:15:51 -07:00
segment.h f2fs: adjust zone capacity when considering valid block count 2022-07-30 20:16:20 -07:00
shrinker.c f2fs: avoid race condition for shrinker count 2020-12-03 00:59:26 -08:00
super.c f2fs: complete checkpoints during remount 2022-09-12 23:07:20 -07:00
sysfs.c f2fs: remove gc_urgent_high_limited for cleanup 2022-08-29 21:15:51 -07:00
verity.c f2fs: use memcpy_{to,from}_page() where possible 2022-08-29 21:15:51 -07:00
xattr.c f2fs: move f2fs to use reader-unfair rwsems 2022-01-24 17:40:04 -08:00
xattr.h f2fs: code cleanup by removing ifdef macro surrounding 2020-05-26 18:56:10 -07:00