diff options
| author | Zhang Yi <yi.zhang@huawei.com> | 2025-04-23 16:52:54 +0800 |
|---|---|---|
| committer | Theodore Ts'o <tytso@mit.edu> | 2025-05-14 10:42:12 -0400 |
| commit | 0b8e0bd45007d5740391e658c2581bd614207387 (patch) | |
| tree | b56d64531d976768a80672f38ed93ca63e3fd5e2 /fs/ext4/inode.c | |
| parent | f22a0ef2231a7d8374bb021eb86404d0e9de5a02 (diff) | |
| download | linux-next-0b8e0bd45007d5740391e658c2581bd614207387.tar.gz linux-next-0b8e0bd45007d5740391e658c2581bd614207387.zip | |
ext4: factor out is_special_ino()
Factor out the helper is_special_ino() to facilitate the checking of
special inodes in the subsequent patches.
Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Link: https://patch.msgid.link/20250423085257.122685-7-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/inode.c')
| -rw-r--r-- | fs/ext4/inode.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 8c0d6fa58f26..64cadc46e420 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -4797,12 +4797,7 @@ struct inode *__ext4_iget(struct super_block *sb, unsigned long ino, gid_t i_gid; projid_t i_projid; - if ((!(flags & EXT4_IGET_SPECIAL) && - ((ino < EXT4_FIRST_INO(sb) && ino != EXT4_ROOT_INO) || - ino == le32_to_cpu(es->s_usr_quota_inum) || - ino == le32_to_cpu(es->s_grp_quota_inum) || - ino == le32_to_cpu(es->s_prj_quota_inum) || - ino == le32_to_cpu(es->s_orphan_file_inum))) || + if ((!(flags & EXT4_IGET_SPECIAL) && is_special_ino(sb, ino)) || (ino < EXT4_ROOT_INO) || (ino > le32_to_cpu(es->s_inodes_count))) { if (flags & EXT4_IGET_HANDLE) |
