]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
[LogFS] Move assertion
authorJoern Engel <joern@logfs.org>
Tue, 13 Apr 2010 15:57:21 +0000 (17:57 +0200)
committerJoern Engel <joern@logfs.org>
Tue, 13 Apr 2010 15:57:21 +0000 (17:57 +0200)
The assertion is valid independently of the condition.

Signed-off-by: Joern Engel <joern@logfs.org>
fs/logfs/journal.c

index 2957bfc21927862fcc643e273951f877ff625d2e..fd44eeea513567d9822e39af164c67ced2158d1a 100644 (file)
@@ -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;