Skip to content

Commit

Permalink
[LogFS] Move assertion
Browse files Browse the repository at this point in the history
The assertion is valid independently of the condition.

Signed-off-by: Joern Engel <joern@logfs.org>
  • Loading branch information
Joern Engel committed Apr 13, 2010
1 parent d3a03f8 commit ead88af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/logfs/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ead88af

Please sign in to comment.