Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752465AbdHPVDQ (ORCPT ); Wed, 16 Aug 2017 17:03:16 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:34599 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752105AbdHPVDP (ORCPT ); Wed, 16 Aug 2017 17:03:15 -0400 MIME-Version: 1.0 In-Reply-To: References: <20170816171211.4021-1-christian.brauner@ubuntu.com> <20170816194805.hnof3aqiqykwki7p@gmail.com> From: Linus Torvalds Date: Wed, 16 Aug 2017 14:03:14 -0700 X-Google-Sender-Auth: ns6M79_SEqTD0uiVc7oDDoz9KNA Message-ID: Subject: Re: [PATCH 0/1] devpts: use dynamic_dname() to generate proc name To: Christian Brauner Cc: Christian Brauner , Linux Kernel Mailing List , "Serge E. Hallyn" , Al Viro Content-Type: multipart/mixed; boundary="001a113bcb38713d5f0556e53905" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4653 Lines: 76 --001a113bcb38713d5f0556e53905 Content-Type: text/plain; charset="UTF-8" On Wed, Aug 16, 2017 at 1:30 PM, Linus Torvalds wrote: > > I suspect the easiest fix is to just add a "mnt" argument to > devpts_acquire(), It shouldn't be too painful. Let me try. Ok, here's a *very* lightly tested patch. It might have new bugs, but it makes your test program DTRT. Al, mind going over this and making sure I didn't miss anything? And Christian, if you can beat on this, that would be good. Linus --001a113bcb38713d5f0556e53905 Content-Type: text/plain; charset="US-ASCII"; name="patch.diff" Content-Disposition: attachment; filename="patch.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_j6fi6t8z0 IGRyaXZlcnMvdHR5L3B0eS5jICAgICAgICAgfCAxNSArKysrKysrKysrKy0tLS0KIGZzL2RldnB0 cy9pbm9kZS5jICAgICAgICAgfCAgNCArKystCiBpbmNsdWRlL2xpbnV4L2RldnB0c19mcy5oIHwg IDIgKy0KIDMgZ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