fs/proc_namespace.c: simplify testing nsp and nsp->mnt_ns

Trivial cleanup to eliminate a goto.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Axel Lin 2014-01-23 15:55:44 -08:00 committed by Linus Torvalds
parent c1d867a54d
commit 3d93116cef
1 changed files with 1 additions and 6 deletions

View File

@ -234,17 +234,12 @@ static int mounts_open_common(struct inode *inode, struct file *file,
rcu_read_lock();
nsp = task_nsproxy(task);
if (!nsp) {
if (!nsp || !nsp->mnt_ns) {
rcu_read_unlock();
put_task_struct(task);
goto err;
}
ns = nsp->mnt_ns;
if (!ns) {
rcu_read_unlock();
put_task_struct(task);
goto err;
}
get_mnt_ns(ns);
rcu_read_unlock();
task_lock(task);