X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=fs%2Fproc_namespace.c;h=7be26f03a3f5813ed501bea520e79041af4466f7;hb=4907cdca7210c5895311bddcf05a4c85b67d8566;hp=439406e081af903a298f6305d9e7c1d744b58813;hpb=ceb3b0212dfc843a6abe8a6f3b4e28c1f2059e64;p=~andy%2Flinux diff --git a/fs/proc_namespace.c b/fs/proc_namespace.c index 439406e081a..7be26f03a3f 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);