mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-16 19:13:39 -04:00
zram: add might_sleep to zcomp API
Explicitly state that zcomp compress/decompress must be called from non-atomic context. Link: https://lkml.kernel.org/r/20250303022425.285971-20-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org> Cc: Hillf Danton <hdanton@sina.com> Cc: Kairui Song <ryncsn@gmail.com> Cc: Minchan Kim <minchan@kernel.org> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: Yosry Ahmed <yosry.ahmed@linux.dev> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
committed by
Andrew Morton
parent
a6d2193b3e
commit
2ad951865a
@@ -146,6 +146,7 @@ int zcomp_compress(struct zcomp *comp, struct zcomp_strm *zstrm,
|
||||
};
|
||||
int ret;
|
||||
|
||||
might_sleep();
|
||||
ret = comp->ops->compress(comp->params, &zstrm->ctx, &req);
|
||||
if (!ret)
|
||||
*dst_len = req.dst_len;
|
||||
@@ -162,6 +163,7 @@ int zcomp_decompress(struct zcomp *comp, struct zcomp_strm *zstrm,
|
||||
.dst_len = PAGE_SIZE,
|
||||
};
|
||||
|
||||
might_sleep();
|
||||
return comp->ops->decompress(comp->params, &zstrm->ctx, &req);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user