103dee43af3039996f007f5ca3e3187644621f50 Issue on fs/namespace.c file . fs/namespace.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/fs/namespace.c b/fs/namespace.c index 4fb1691..af9aad2 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -650,7 +650,7 @@ struct mount *__lookup_mnt_last(struct vfsmount *mnt, struct dentry *dentry) if (!(p->mnt.mnt_flags & MNT_UMOUNT)) res = p; hlist_for_each_entry_continue(p, mnt_hash) { - if (&p->mnt_parent->mnt != mnt || p->mnt_mountpoint != dentry) + if ((&p->mnt_parent->mnt != mnt) || (p->mnt_mountpoint != dentry)) break; if (!(p->mnt.mnt_flags & MNT_UMOUNT)) res = p; @@ -781,7 +781,7 @@ static void put_mountpoint(struct mountpoint *mp) static inline int check_mnt(struct mount *mnt) { - return mnt->mnt_ns == current->nsproxy->mnt_ns; + return (mnt->mnt_ns == current->nsproxy->mnt_ns); } /* @@ -800,7 +800,7 @@ static void touch_mnt_namespace(struct mnt_namespace *ns) */ static void __touch_mnt_namespace(struct mnt_namespace *ns) { - if (ns && ns->event != event) { + if (ns && (ns->event != event)) { ns->event = event; wake_up_interruptible(&ns->poll); } @@ -1181,7 +1181,7 @@ int generic_show_options(struct seq_file *m, struct dentry *root) rcu_read_lock(); options = rcu_dereference(root->d_sb->s_options); - if (options != NULL && options[0]) { + if ((options != NULL) && options[0]) { seq_putc(m, ','); mangle(m, options); } @@ -1233,7 +1233,7 @@ static void *m_start(struct seq_file *m, loff_t *pos) void *v = p->cached_mount; if (*pos == p->cached_index) return v; - if (*pos == p->cached_index + 1) { + if (*pos == (p->cached_index + 1)) { v = seq_list_next(v, &p->ns->list, &p->cached_index); return p->cached_mount = v; } @@ -1463,8 +1463,8 @@ static int do_umount(struct mount *mnt, int flags) * (2) the usage count == 1 [parent vfsmount] + 1 [sys_umount] */ if (flags & MNT_EXPIRE) { - if (&mnt->mnt == current->fs->root.mnt || - flags & (MNT_FORCE | MNT_DETACH)) + if ((&mnt->mnt == current->fs->root.mnt) || + (flags & (MNT_FORCE | MNT_DETACH))) return -EINVAL; /* @@ -1505,7 +1505,7 @@ static int do_umount(struct mount *mnt, int flags) * /reboot - static binary that would close all descriptors and * call reboot(9). Then init(8) could umount root and exec /reboot. */ - if (&mnt->mnt == current->fs->root.mnt && !(flags & MNT_DETACH)) { + if ((&mnt->mnt == current->fs->root.mnt) && !(flags & MNT_DETACH)) { /* * Special case for "unmounting" root ... * we just try to remount it readonly. @@ -1655,8 +1655,8 @@ SYSCALL_DEFINE1(oldumount, char __user *, name) static bool is_mnt_ns_file(struct dentry *dentry) { /* Is this a proxy for a mount namespace? */ - return dentry->d_op == &ns_dentry_operations && - dentry->d_fsdata == &mntns_operations; + return (dentry->d_op == &ns_dentry_operations) && + (dentry->d_fsdata == &mntns_operations); } struct mnt_namespace *to_mnt_ns(struct ns_common *ns) @@ -1674,7 +1674,7 @@ static bool mnt_ns_loop(struct dentry *dentry) return false; mnt_ns = to_mnt_ns(get_proc_ns(dentry->d_inode)); - return current->nsproxy->mnt_ns->seq >= mnt_ns->seq; + return (current->nsproxy->mnt_ns->seq >= mnt_ns->seq); } struct mount *copy_tree(struct mount *mnt, struct dentry *dentry, @@ -2359,8 +2359,8 @@ static int do_add_mount(struct mount *newmnt, struct path *path, int mnt_flags) /* Refuse the same filesystem on the same mount point */ err = -EBUSY; - if (path->mnt->mnt_sb == newmnt->mnt.mnt_sb && - path->mnt->mnt_root == path->dentry) + if ((path->mnt->mnt_sb == newmnt->mnt.mnt_sb) && + (path->mnt->mnt_root == path->dentry)) goto unlock; err = -EINVAL; @@ -2438,8 +2438,8 @@ int finish_automount(struct vfsmount *m, struct path *path) */ BUG_ON(mnt_get_count(mnt) < 2); - if (m->mnt_sb == path->mnt->mnt_sb && - m->mnt_root == path->dentry) { + if ((m->mnt_sb == path->mnt->mnt_sb) && + (m->mnt_root == path->dentry)) { err = -ELOOP; goto fail; } @@ -2941,11 +2941,11 @@ out_type: bool is_path_reachable(struct mount *mnt, struct dentry *dentry, const struct path *root) { - while (&mnt->mnt != root->mnt && mnt_has_parent(mnt)) { + while ((&mnt->mnt != root->mnt) && mnt_has_parent(mnt)) { dentry = mnt->mnt_mountpoint; mnt = mnt->mnt_parent; } - return &mnt->mnt == root->mnt && is_subdir(dentry, root->dentry); + return (&mnt->mnt == root->mnt) && is_subdir(dentry, root->dentry); } bool path_is_under(struct path *path1, struct path *path2) @@ -3028,7 +3028,7 @@ SYSCALL_DEFINE2(pivot_root, const char __user *, new_root, if (d_unlinked(new.dentry)) goto out4; error = -EBUSY; - if (new_mnt == root_mnt || old_mnt == root_mnt) + if ((new_mnt == root_mnt) || (old_mnt == root_mnt)) goto out4; /* loop, on the same file system */ error = -EINVAL; if (root.mnt->mnt_root != root.dentry) -- 2.7.4