summaryrefslogtreecommitdiff
path: root/fs/squashfs/page_actor.h
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2022-06-28 16:54:02 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2022-06-28 16:54:02 +1000
commit8f850ad6cf932b8b5125f9585cb397e08403cccd (patch)
treea82865f7896813d271775ff38858573855caa6c6 /fs/squashfs/page_actor.h
parentee8804b7b3e6c5f45ddeafa3273f673bd4524110 (diff)
parentee56c3e8eec166f4e4a2ca842b7804d14f3a0208 (diff)
downloadlinux-next-8f850ad6cf932b8b5125f9585cb397e08403cccd.tar.gz
Merge branch 'mm-nonmm-stable' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Diffstat (limited to 'fs/squashfs/page_actor.h')
-rw-r--r--fs/squashfs/page_actor.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/fs/squashfs/page_actor.h b/fs/squashfs/page_actor.h
index 2e3073ace009..37523c54256f 100644
--- a/fs/squashfs/page_actor.h
+++ b/fs/squashfs/page_actor.h
@@ -45,6 +45,11 @@ static inline void squashfs_finish_page(struct squashfs_page_actor *actor)
{
/* empty */
}
+
+static inline void squashfs_actor_nobuff(struct squashfs_page_actor *actor)
+{
+ /* empty */
+}
#else
struct squashfs_page_actor {
union {
@@ -52,17 +57,23 @@ struct squashfs_page_actor {
struct page **page;
};
void *pageaddr;
+ void *tmp_buffer;
void *(*squashfs_first_page)(struct squashfs_page_actor *);
void *(*squashfs_next_page)(struct squashfs_page_actor *);
void (*squashfs_finish_page)(struct squashfs_page_actor *);
int pages;
int length;
int next_page;
+ int alloc_buffer;
+ int returned_pages;
+ pgoff_t next_index;
};
-extern struct squashfs_page_actor *squashfs_page_actor_init(void **, int, int);
-extern struct squashfs_page_actor *squashfs_page_actor_init_special(struct page
- **, int, int);
+extern struct squashfs_page_actor *squashfs_page_actor_init(void **buffer,
+ int pages, int length);
+extern struct squashfs_page_actor *squashfs_page_actor_init_special(
+ struct squashfs_sb_info *msblk,
+ struct page **page, int pages, int length);
static inline void *squashfs_first_page(struct squashfs_page_actor *actor)
{
return actor->squashfs_first_page(actor);
@@ -75,5 +86,9 @@ static inline void squashfs_finish_page(struct squashfs_page_actor *actor)
{
actor->squashfs_finish_page(actor);
}
+static inline void squashfs_actor_nobuff(struct squashfs_page_actor *actor)
+{
+ actor->alloc_buffer = 0;
+}
#endif
#endif