Commit 7a29350
zram: reset per-priority params when changing algorithm before init
Parameters validated against one algorithm may be invalid for another
(e.g. lz4 accepts level=65535 but zstd does not). Although algorithm
changes are blocked after disksize is set, they are allowed before
device initialization. Reset per-priority params on algorithm change
so that stale parameters do not silently carry over.
Signed-off-by: Haoqin Huang <haoqinhuang@tencent.com>
Reviewed-by: Rongwei Wang <zigiwang@tencent.com>1 parent a7c0458 commit 7a29350
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
1681 | 1682 | | |
1682 | 1683 | | |
1683 | 1684 | | |
| 1685 | + | |
1684 | 1686 | | |
1685 | 1687 | | |
1686 | 1688 | | |
| |||
0 commit comments