Loading fs/erofs/data.c +3 −4 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ void erofs_put_metabuf(struct erofs_buf *buf) void *erofs_bread(struct erofs_buf *buf, erofs_off_t offset, enum erofs_kmap_type type) { struct inode *inode = buf->inode; pgoff_t index = offset >> PAGE_SHIFT; struct page *page = buf->page; struct folio *folio; Loading @@ -42,7 +41,7 @@ void *erofs_bread(struct erofs_buf *buf, erofs_off_t offset, erofs_put_metabuf(buf); nofs_flag = memalloc_nofs_save(); folio = read_cache_folio(inode->i_mapping, index, NULL, NULL); folio = read_cache_folio(buf->mapping, index, NULL, NULL); memalloc_nofs_restore(nofs_flag); if (IS_ERR(folio)) return folio; Loading @@ -67,9 +66,9 @@ void *erofs_bread(struct erofs_buf *buf, erofs_off_t offset, void erofs_init_metabuf(struct erofs_buf *buf, struct super_block *sb) { if (erofs_is_fscache_mode(sb)) buf->inode = EROFS_SB(sb)->s_fscache->inode; buf->mapping = EROFS_SB(sb)->s_fscache->inode->i_mapping; else buf->inode = sb->s_bdev->bd_inode; buf->mapping = sb->s_bdev->bd_inode->i_mapping; } void *erofs_read_metabuf(struct erofs_buf *buf, struct super_block *sb, Loading fs/erofs/dir.c +1 −1 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ static int erofs_readdir(struct file *f, struct dir_context *ctx) int err = 0; bool initial = true; buf.inode = dir; buf.mapping = dir->i_mapping; while (ctx->pos < dirsize) { struct erofs_dirent *de; unsigned int nameoff, maxsize; Loading fs/erofs/internal.h +1 −1 Original line number Diff line number Diff line Loading @@ -223,7 +223,7 @@ enum erofs_kmap_type { }; struct erofs_buf { struct inode *inode; struct address_space *mapping; struct page *page; void *base; enum erofs_kmap_type kmap_type; Loading fs/erofs/namei.c +2 −2 Original line number Diff line number Diff line Loading @@ -99,7 +99,7 @@ static void *erofs_find_target_block(struct erofs_buf *target, struct erofs_buf buf = __EROFS_BUF_INITIALIZER; struct erofs_dirent *de; buf.inode = dir; buf.mapping = dir->i_mapping; de = erofs_bread(&buf, erofs_pos(dir->i_sb, mid), EROFS_KMAP); if (!IS_ERR(de)) { const int nameoff = nameoff_from_disk(de->nameoff, bsz); Loading Loading @@ -171,7 +171,7 @@ int erofs_namei(struct inode *dir, const struct qstr *name, erofs_nid_t *nid, qn.name = name->name; qn.end = name->name + name->len; buf.inode = dir; buf.mapping = dir->i_mapping; ndirents = 0; de = erofs_find_target_block(&buf, dir, &qn, &ndirents); Loading fs/erofs/xattr.c +1 −1 Original line number Diff line number Diff line Loading @@ -483,7 +483,7 @@ int erofs_xattr_prefixes_init(struct super_block *sb) return -ENOMEM; if (sbi->packed_inode) buf.inode = sbi->packed_inode; buf.mapping = sbi->packed_inode->i_mapping; else erofs_init_metabuf(&buf, sb); Loading Loading
fs/erofs/data.c +3 −4 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ void erofs_put_metabuf(struct erofs_buf *buf) void *erofs_bread(struct erofs_buf *buf, erofs_off_t offset, enum erofs_kmap_type type) { struct inode *inode = buf->inode; pgoff_t index = offset >> PAGE_SHIFT; struct page *page = buf->page; struct folio *folio; Loading @@ -42,7 +41,7 @@ void *erofs_bread(struct erofs_buf *buf, erofs_off_t offset, erofs_put_metabuf(buf); nofs_flag = memalloc_nofs_save(); folio = read_cache_folio(inode->i_mapping, index, NULL, NULL); folio = read_cache_folio(buf->mapping, index, NULL, NULL); memalloc_nofs_restore(nofs_flag); if (IS_ERR(folio)) return folio; Loading @@ -67,9 +66,9 @@ void *erofs_bread(struct erofs_buf *buf, erofs_off_t offset, void erofs_init_metabuf(struct erofs_buf *buf, struct super_block *sb) { if (erofs_is_fscache_mode(sb)) buf->inode = EROFS_SB(sb)->s_fscache->inode; buf->mapping = EROFS_SB(sb)->s_fscache->inode->i_mapping; else buf->inode = sb->s_bdev->bd_inode; buf->mapping = sb->s_bdev->bd_inode->i_mapping; } void *erofs_read_metabuf(struct erofs_buf *buf, struct super_block *sb, Loading
fs/erofs/dir.c +1 −1 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ static int erofs_readdir(struct file *f, struct dir_context *ctx) int err = 0; bool initial = true; buf.inode = dir; buf.mapping = dir->i_mapping; while (ctx->pos < dirsize) { struct erofs_dirent *de; unsigned int nameoff, maxsize; Loading
fs/erofs/internal.h +1 −1 Original line number Diff line number Diff line Loading @@ -223,7 +223,7 @@ enum erofs_kmap_type { }; struct erofs_buf { struct inode *inode; struct address_space *mapping; struct page *page; void *base; enum erofs_kmap_type kmap_type; Loading
fs/erofs/namei.c +2 −2 Original line number Diff line number Diff line Loading @@ -99,7 +99,7 @@ static void *erofs_find_target_block(struct erofs_buf *target, struct erofs_buf buf = __EROFS_BUF_INITIALIZER; struct erofs_dirent *de; buf.inode = dir; buf.mapping = dir->i_mapping; de = erofs_bread(&buf, erofs_pos(dir->i_sb, mid), EROFS_KMAP); if (!IS_ERR(de)) { const int nameoff = nameoff_from_disk(de->nameoff, bsz); Loading Loading @@ -171,7 +171,7 @@ int erofs_namei(struct inode *dir, const struct qstr *name, erofs_nid_t *nid, qn.name = name->name; qn.end = name->name + name->len; buf.inode = dir; buf.mapping = dir->i_mapping; ndirents = 0; de = erofs_find_target_block(&buf, dir, &qn, &ndirents); Loading
fs/erofs/xattr.c +1 −1 Original line number Diff line number Diff line Loading @@ -483,7 +483,7 @@ int erofs_xattr_prefixes_init(struct super_block *sb) return -ENOMEM; if (sbi->packed_inode) buf.inode = sbi->packed_inode; buf.mapping = sbi->packed_inode->i_mapping; else erofs_init_metabuf(&buf, sb); Loading