Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ead88af5 authored by Joern Engel's avatar Joern Engel
Browse files

[LogFS] Move assertion



The assertion is valid independently of the condition.

Signed-off-by: default avatarJoern Engel <joern@logfs.org>
parent d3a03f80
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -612,9 +612,9 @@ static size_t __logfs_write_je(struct super_block *sb, void *buf, u16 type,
	if (len == 0)
		return logfs_write_header(super, header, 0, type);

	BUG_ON(len > sb->s_blocksize);
	compr_len = logfs_compress(buf, data, len, sb->s_blocksize);
	if (compr_len < 0 || type == JE_ANCHOR) {
		BUG_ON(len > sb->s_blocksize);
		memcpy(data, buf, len);
		compr_len = len;
		compr = COMPR_NONE;