diff options
author | Chao Yu <chao.yu@oppo.com> | 2022-10-04 09:11:33 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2022-10-07 12:56:45 -0700 |
commit | 8ec071c363da3f45585b338b2037de289379939c (patch) | |
tree | 8c109e2ae0b68574a23b13abe9f48b20d33f7444 /fs/f2fs/data.c | |
parent | 689fe57e7ecefd2eeba76c32aa569bb3e1e790d9 (diff) |
f2fs: account swapfile inodes
In order to check count of opened swapfile inodes.
Signed-off-by: Chao Yu <chao.yu@oppo.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/data.c')
-rw-r--r-- | fs/f2fs/data.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 1c82a4a4e861..5f895ddcd64a 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -3989,6 +3989,7 @@ static int f2fs_swap_activate(struct swap_info_struct *sis, struct file *file, if (ret < 0) return ret; + stat_inc_swapfile_inode(inode); set_inode_flag(inode, FI_PIN_FILE); f2fs_update_time(F2FS_I_SB(inode), REQ_TIME); return ret; @@ -3998,6 +3999,7 @@ static void f2fs_swap_deactivate(struct file *file) { struct inode *inode = file_inode(file); + stat_dec_swapfile_inode(inode); clear_inode_flag(inode, FI_PIN_FILE); } #else |