]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
erofs: get rid of erofs_is_ishare_inode() helper
authorGao Xiang <hsiangkao@linux.alibaba.com>
Tue, 7 Jul 2026 13:39:39 +0000 (21:39 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Wed, 8 Jul 2026 07:07:47 +0000 (15:07 +0800)
Just open-code it for simplicity since FS_ONDEMAND no longer exists.

Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
fs/erofs/ishare.c

index 0868c12fc15b43fca5b7719ca4fe025af95b1fd1..a1a20a5ba548f57f41df2fbc1e4b43200fd2d431 100644 (file)
 
 static struct vfsmount *erofs_ishare_mnt;
 
-static inline bool erofs_is_ishare_inode(struct inode *inode)
-{
-       /* assumed FS_ONDEMAND is excluded with FS_PAGE_CACHE_SHARE feature */
-       return inode->i_sb->s_type == &erofs_anon_fs_type;
-}
-
 static int erofs_ishare_iget5_eq(struct inode *inode, void *data)
 {
        struct erofs_inode_fingerprint *fp1 = &EROFS_I(inode)->fingerprint;
@@ -179,7 +173,7 @@ struct inode *erofs_real_inode(struct inode *inode, bool *need_iput)
        struct inode *realinode;
 
        *need_iput = false;
-       if (!erofs_is_ishare_inode(inode))
+       if (inode->i_sb != erofs_ishare_mnt->mnt_sb)
                return inode;
 
        vi_share = EROFS_I(inode);