diff options
author | Axel Lin <axel.lin@ingics.com> | 2014-01-24 03:55:44 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-24 04:37:02 +0400 |
commit | 3d93116cef306bd516a7645e7b4895d1d0ceec2b (patch) | |
tree | 974f69bf3cd19acc32c0c58d4afade88d9913798 /fs/proc_namespace.c | |
parent | c1d867a54d426b45da017fbe8e585f8a3064ce8d (diff) | |
download | linux-3d93116cef306bd516a7645e7b4895d1d0ceec2b.tar.xz |
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>
Diffstat (limited to 'fs/proc_namespace.c')
-rw-r--r-- | fs/proc_namespace.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/proc_namespace.c b/fs/proc_namespace.c index 439406e081af..7be26f03a3f5 100644 --- a/fs/proc_namespace.c +++ b/fs/proc_namespace.c @@ -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); |