diff options
author | Yaowei Bai <baiyaowei@cmss.chinamobile.com> | 2015-11-17 07:40:10 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-12-07 03:17:13 +0100 |
commit | 25ab4c9b1ccb64b1433cecd3f19f28fe300c1576 (patch) | |
tree | 1a4a7062cc06d8a12d10bc7203fa1dffb8b4610a /fs/namespace.c | |
parent | fs/block_dev.c: make sb_is_blkdev_sb return bool when CONFIG_BLOCK undefined (diff) | |
download | linux-25ab4c9b1ccb64b1433cecd3f19f28fe300c1576.tar.xz linux-25ab4c9b1ccb64b1433cecd3f19f28fe300c1576.zip |
fs/namespace.c: path_is_under can be boolean
This patch makes path_is_under return bool to improve
readability due to this particular function only using either
one or zero as its return value.
No functional change.
Signed-off-by: Yaowei Bai <baiyaowei@cmss.chinamobile.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r-- | fs/namespace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index 0570729c87fd..b27156f2e68b 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -2939,9 +2939,9 @@ bool is_path_reachable(struct mount *mnt, struct dentry *dentry, return &mnt->mnt == root->mnt && is_subdir(dentry, root->dentry); } -int path_is_under(struct path *path1, struct path *path2) +bool path_is_under(struct path *path1, struct path *path2) { - int res; + bool res; read_seqlock_excl(&mount_lock); res = is_path_reachable(real_mount(path1->mnt), path1->dentry, path2); read_sequnlock_excl(&mount_lock); |