Commit 22224a17 authored by Vincent Stehlé's avatar Vincent Stehlé Committed by Jiri Kosina

fs/super.c: use && instead of & for warn_on condition

This fixes the following sparse warning:

  fs/super.c:1202:9: warning: dubious: x & !y

Bitwise and logical and are equivalent here, but logical was intended.
The generated code is identical, with and without CONFIG_LOCKDEP.
Signed-off-by: default avatarVincent Stehlé <vincent.stehle@freescale.com>
Acked-by: default avatarOleg Nesterov <oleg@redhat.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent d83e2a4e
...@@ -1199,7 +1199,7 @@ int __sb_start_write(struct super_block *sb, int level, bool wait) ...@@ -1199,7 +1199,7 @@ int __sb_start_write(struct super_block *sb, int level, bool wait)
else else
ret = percpu_down_read_trylock(sb->s_writers.rw_sem + level-1); ret = percpu_down_read_trylock(sb->s_writers.rw_sem + level-1);
WARN_ON(force_trylock & !ret); WARN_ON(force_trylock && !ret);
return ret; return ret;
} }
EXPORT_SYMBOL(__sb_start_write); EXPORT_SYMBOL(__sb_start_write);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment