[PATCH] vfs: fix boolreturn.cocci warnings
From: kbuild test robot
Date: Mon Nov 14 2016 - 18:59:44 EST
fs/namespace.c:1185:9-10: WARNING: return of 0/1 in function 'path_is_mountpoint' with return type bool
fs/namespace.c:1199:9-10: WARNING: return of 0/1 in function 'path_is_mountpoint_rcu' with return type bool
Return statements in functions returning bool should use
true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci
CC: Ian Kent <ikent@xxxxxxxxxx>
Signed-off-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
---
namespace.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1182,7 +1182,7 @@ bool path_is_mountpoint(struct path *pat
bool res;
if (!d_mountpoint(path->dentry))
- return 0;
+ return false;
rcu_read_lock();
res = __path_is_mountpoint(path);
@@ -1196,7 +1196,7 @@ EXPORT_SYMBOL(path_is_mountpoint);
bool path_is_mountpoint_rcu(struct path *path)
{
if (!d_mountpoint(path->dentry))
- return 0;
+ return false;
return __path_is_mountpoint(path);
}