From: Vincent Stehlé Date: Mon, 21 Sep 2015 15:18:34 +0000 (+0200) Subject: fs/super.c: use && instead of & for warn_on condition X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=22224a17587c90e25371e7d07c079548359b2039;p=deliverable%2Flinux.git 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: Vincent Stehlé Acked-by: Oleg Nesterov Signed-off-by: Jiri Kosina --- diff --git a/fs/super.c b/fs/super.c index 954aeb80e202..7ea56de57d4b 100644 --- a/fs/super.c +++ b/fs/super.c @@ -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);