diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-08-11 12:45:39 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-08-20 08:59:42 -0700 |
commit | 315df8398e36360c0be62e6fdd3f2708fc3a2567 (patch) | |
tree | d2e5a7bc57291777d558bd6083fbdad2f26e8565 /fs/f2fs/super.c | |
parent | 4c278394b0feb7aadc538be12ab0474b106a7255 (diff) | |
download | blackbird-op-linux-315df8398e36360c0be62e6fdd3f2708fc3a2567.tar.gz blackbird-op-linux-315df8398e36360c0be62e6fdd3f2708fc3a2567.zip |
f2fs: do not write any node pages related to orphan inodes
We should not write node pages when deleting orphan inodes.
In order to do that, we can eaisly set POR_DOING flag earlier before entering
orphan inode routine.
Reviewed-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r-- | fs/f2fs/super.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 4db5cd9fb4b9..cfe3f9579934 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -1165,7 +1165,9 @@ try_onemore: mutex_init(&sbi->writepages); mutex_init(&sbi->cp_mutex); init_rwsem(&sbi->node_write); - clear_sbi_flag(sbi, SBI_POR_DOING); + + /* disallow all the data/node/meta page writes */ + set_sbi_flag(sbi, SBI_POR_DOING); spin_lock_init(&sbi->stat_lock); init_rwsem(&sbi->read_io.io_rwsem); @@ -1309,6 +1311,8 @@ try_onemore: goto free_kobj; } } + /* recover_fsync_data() cleared this already */ + clear_sbi_flag(sbi, SBI_POR_DOING); /* * If filesystem is not mounted as read-only then |