提交 22224a17 编写于 作者: V Vincent Stehlé 提交者: 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: NVincent Stehlé <vincent.stehle@freescale.com>
Acked-by: NOleg Nesterov <oleg@redhat.com>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 d83e2a4e
......@@ -1199,7 +1199,7 @@ int __sb_start_write(struct super_block *sb, int level, bool wait)
else
ret = percpu_down_read_trylock(sb->s_writers.rw_sem + level-1);
WARN_ON(force_trylock & !ret);
WARN_ON(force_trylock && !ret);
return ret;
}
EXPORT_SYMBOL(__sb_start_write);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册