diff options
| author | Christoph Hellwig <[email protected]> | 2024-08-30 22:36:49 +0000 |
|---|---|---|
| committer | Darrick J. Wong <[email protected]> | 2024-09-01 15:58:19 +0000 |
| commit | feb09b727b03421179282299362620ea0d07a066 (patch) | |
| tree | c4572f3e455e3a89b59e32e29cf5aa1de554a842 /fs/xfs/xfs_inode.h | |
| parent | xfs: validate inumber in xfs_iget (diff) | |
| download | kernel-feb09b727b03421179282299362620ea0d07a066.tar.gz kernel-feb09b727b03421179282299362620ea0d07a066.zip | |
xfs: match on the global RT inode numbers in xfs_is_metadata_inode
Match the inode number instead of the inode pointers, as the inode
pointers in the superblock will go away soon.
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
[djwong: port to my tree, make the parameter a const pointer]
Signed-off-by: Darrick J. Wong <[email protected]>
Diffstat (limited to 'fs/xfs/xfs_inode.h')
| -rw-r--r-- | fs/xfs/xfs_inode.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h index 51defdebef30..1908409968db 100644 --- a/fs/xfs/xfs_inode.h +++ b/fs/xfs/xfs_inode.h @@ -276,12 +276,13 @@ static inline bool xfs_is_reflink_inode(struct xfs_inode *ip) return ip->i_diflags2 & XFS_DIFLAG2_REFLINK; } -static inline bool xfs_is_metadata_inode(struct xfs_inode *ip) +static inline bool xfs_is_metadata_inode(const struct xfs_inode *ip) { struct xfs_mount *mp = ip->i_mount; - return ip == mp->m_rbmip || ip == mp->m_rsumip || - xfs_is_quota_inode(&mp->m_sb, ip->i_ino); + return ip->i_ino == mp->m_sb.sb_rbmino || + ip->i_ino == mp->m_sb.sb_rsumino || + xfs_is_quota_inode(&mp->m_sb, ip->i_ino); } bool xfs_is_always_cow_inode(struct xfs_inode *ip); |
