Skip to content
Commit 2fc9913a authored by Kexin(Casey) Chen's avatar Kexin(Casey) Chen Committed by Bruce Ashfield
Browse files

aufs: fix compile warning

Forward port linux-yocto-4.8's patch to fix the build warning.

    http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-4.8/commit/?h=standard/base&id=7e0dd2f2b0971f0e3191e1ddc088e09eb9855567



fs/aufs/debug.h:95:19: warning: comparison of constant '0'
with boolean expression is always false [-Wbool-compare]
   if (unlikely((e) < 0)) \
                    ^

fs/aufs/vdir.c:852:2: note: in expansion of macro 'AuTraceErr'
   AuTraceErr(!valid);
   ^~~~~~~~~~

In expansion of AuTraceErr(!valid), comparison of (!valid)
and constant '0' always passes unlikely(x) false. function
'static int seek_vdir(struct file *file, struct dir_context *ctx)'
is to find whether there is a valid vd_deblk following ctx->pos.
return 1 means valid, 0 for not. Change to AuTraceErr(valid - 1)
makes more sense.

Signed-off-by: default avatarKexin(Casey) Chen <Casey.Chen@windriver.com>
Signed-off-by: default avatarDengke Du <dengke.du@windriver.com>
Signed-off-by: default avatarBruce Ashfield <bruce.ashfield@windriver.com>
parent 3247d5a2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment