Skip to content

Commit ead88af

Browse files
author
Joern Engel
committed
[LogFS] Move assertion
The assertion is valid independently of the condition. Signed-off-by: Joern Engel <joern@logfs.org>
1 parent d3a03f8 commit ead88af

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/logfs/journal.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,9 +612,9 @@ static size_t __logfs_write_je(struct super_block *sb, void *buf, u16 type,
612612
if (len == 0)
613613
return logfs_write_header(super, header, 0, type);
614614

615+
BUG_ON(len > sb->s_blocksize);
615616
compr_len = logfs_compress(buf, data, len, sb->s_blocksize);
616617
if (compr_len < 0 || type == JE_ANCHOR) {
617-
BUG_ON(len > sb->s_blocksize);
618618
memcpy(data, buf, len);
619619
compr_len = len;
620620
compr = COMPR_NONE;

0 commit comments

Comments
 (0)