diff options
author | Chao Yu <chao@kernel.org> | 2024-05-06 12:45:37 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2024-05-09 03:03:17 +0200 |
commit | 968c4f72b23c0c8f1e94e942eab89b8c5a3022e7 (patch) | |
tree | e4cc9a78e80fd84008b0b9270652203d76faaa6f /fs/f2fs/inode.c | |
parent | f2fs: use f2fs_{err,info}_ratelimited() for cleanup (diff) | |
download | linux-968c4f72b23c0c8f1e94e942eab89b8c5a3022e7.tar.xz linux-968c4f72b23c0c8f1e94e942eab89b8c5a3022e7.zip |
f2fs: remove unused GC_FAILURE_PIN
After commit 3db1de0e582c ("f2fs: change the current atomic write way"),
we removed all GC_FAILURE_ATOMIC usage, let's change i_gc_failures[]
array to i_pin_failure for cleanup.
Meanwhile, let's define i_current_depth and i_gc_failures as union
variable due to they won't be valid at the same time.
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/inode.c')
-rw-r--r-- | fs/f2fs/inode.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index 7968b14d49f4..005dde72aff3 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode.c @@ -415,8 +415,7 @@ static int do_read_inode(struct inode *inode) if (S_ISDIR(inode->i_mode)) fi->i_current_depth = le32_to_cpu(ri->i_current_depth); else if (S_ISREG(inode->i_mode)) - fi->i_gc_failures[GC_FAILURE_PIN] = - le16_to_cpu(ri->i_gc_failures); + fi->i_gc_failures = le16_to_cpu(ri->i_gc_failures); fi->i_xattr_nid = le32_to_cpu(ri->i_xattr_nid); fi->i_flags = le32_to_cpu(ri->i_flags); if (S_ISREG(inode->i_mode)) @@ -686,8 +685,7 @@ void f2fs_update_inode(struct inode *inode, struct page *node_page) ri->i_current_depth = cpu_to_le32(F2FS_I(inode)->i_current_depth); else if (S_ISREG(inode->i_mode)) - ri->i_gc_failures = - cpu_to_le16(F2FS_I(inode)->i_gc_failures[GC_FAILURE_PIN]); + ri->i_gc_failures = cpu_to_le16(F2FS_I(inode)->i_gc_failures); ri->i_xattr_nid = cpu_to_le32(F2FS_I(inode)->i_xattr_nid); ri->i_flags = cpu_to_le32(F2FS_I(inode)->i_flags); ri->i_pino = cpu_to_le32(F2FS_I(inode)->i_pino); |