mirror of
https://github.com/torvalds/linux.git
synced 2024-11-13 23:51:39 +00:00
dm integrity: fix gcc 5 warning
This commit fixes gcc 5 warning "logical not is only applied to the left
hand side of comparison"
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Fixes: fb0987682c
("dm-integrity: introduce the Inline mode")
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
This commit is contained in:
parent
26207c6332
commit
a8fa6483b4
@ -4715,13 +4715,18 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned int argc, char **argv
|
||||
ti->error = "Block size doesn't match the information in superblock";
|
||||
goto bad;
|
||||
}
|
||||
if (!le32_to_cpu(ic->sb->journal_sections) != (ic->mode == 'I')) {
|
||||
r = -EINVAL;
|
||||
if (ic->mode != 'I')
|
||||
if (ic->mode != 'I') {
|
||||
if (!le32_to_cpu(ic->sb->journal_sections)) {
|
||||
r = -EINVAL;
|
||||
ti->error = "Corrupted superblock, journal_sections is 0";
|
||||
else
|
||||
goto bad;
|
||||
}
|
||||
} else {
|
||||
if (le32_to_cpu(ic->sb->journal_sections)) {
|
||||
r = -EINVAL;
|
||||
ti->error = "Corrupted superblock, journal_sections is not 0";
|
||||
goto bad;
|
||||
goto bad;
|
||||
}
|
||||
}
|
||||
/* make sure that ti->max_io_len doesn't overflow */
|
||||
if (!ic->meta_dev) {
|
||||
|
Loading…
Reference in New Issue
Block a user