Skip to content

Commit

Permalink
erofs: Adapt 4.9 getattr inode_operations
Browse files Browse the repository at this point in the history
Signed-off-by: wulan17 <wulan17@nusantararom.org>
  • Loading branch information
asuka-mio authored and Hadenix committed Feb 2, 2024
1 parent 100aadf commit 86b81f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions fs/erofs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,17 +337,19 @@ struct inode *erofs_iget(struct super_block *sb,
return inode;
}

int erofs_getattr(const struct path *path, struct kstat *stat,
u32 request_mask, unsigned int query_flags)
int erofs_getattr(struct vfsmount *mnt, struct dentry *dentry,
struct kstat *stat)
{
struct inode *const inode = d_inode(path->dentry);
struct inode *const inode = d_inode(dentry);

#if 0
if (erofs_inode_is_data_compressed(EROFS_I(inode)->datalayout))
stat->attributes |= STATX_ATTR_COMPRESSED;

stat->attributes |= STATX_ATTR_IMMUTABLE;
stat->attributes_mask |= (STATX_ATTR_COMPRESSED |
STATX_ATTR_IMMUTABLE);
#endif

generic_fillattr(inode, stat);
return 0;
Expand Down
4 changes: 2 additions & 2 deletions fs/erofs/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,8 @@ extern const struct inode_operations erofs_symlink_iops;
extern const struct inode_operations erofs_fast_symlink_iops;

struct inode *erofs_iget(struct super_block *sb, erofs_nid_t nid, bool dir);
int erofs_getattr(const struct path *path, struct kstat *stat,
u32 request_mask, unsigned int query_flags);
int erofs_getattr(struct vfsmount *mnt, struct dentry *dentry,
struct kstat *stat);

/* namei.c */
extern const struct inode_operations erofs_dir_iops;
Expand Down

0 comments on commit 86b81f8

Please sign in to comment.