diff options
author | Ryusuke Konishi <konishi.ryusuke@gmail.com> | 2024-08-26 19:41:11 +0200 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-09-02 05:43:43 +0200 |
commit | d7cee0b342cd90abe5d09976a69d1a22ad0c3441 (patch) | |
tree | 446cbdb1d7bc0093dcc72a14474d9f480e95eb15 /fs/nilfs2/segment.c | |
parent | nilfs2: use the BITS_PER_LONG macro (diff) | |
download | linux-d7cee0b342cd90abe5d09976a69d1a22ad0c3441.tar.xz linux-d7cee0b342cd90abe5d09976a69d1a22ad0c3441.zip |
nilfs2: separate inode type information from i_state field
In nilfs_iget_locked() and nilfs_ilookup(), which are used to find or
obtain nilfs2 inodes, the nilfs_iget_args structure used to identify
inodes has type information divided into multiple booleans, making type
determination complicated.
Simplify inode type determination by consolidating inode type information
into an unsigned integer represented by a comibination of flags and by
separating the type identification information for on-memory inodes from
the i_state member in the nilfs_inode_info structure.
Link: https://lkml.kernel.org/r/20240826174116.5008-4-konishi.ryusuke@gmail.com
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Cc: Huang Xiaojia <huangxiaojia2@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs/nilfs2/segment.c')
-rw-r--r-- | fs/nilfs2/segment.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c index 2a771e222d86..e4ec36d66607 100644 --- a/fs/nilfs2/segment.c +++ b/fs/nilfs2/segment.c @@ -519,7 +519,7 @@ static void nilfs_segctor_end_finfo(struct nilfs_sc_info *sci, ii = NILFS_I(inode); - if (test_bit(NILFS_I_GCINODE, &ii->i_state)) + if (ii->i_type & NILFS_I_TYPE_GC) cno = ii->i_cno; else if (NILFS_ROOT_METADATA_FILE(inode->i_ino)) cno = 0; |