From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-db3on0141.outbound.protection.outlook.com ([157.55.234.141]:49305 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751002AbcCOPwC (ORCPT ); Tue, 15 Mar 2016 11:52:02 -0400 Message-ID: <56E81A0D.9090803@virtuozzo.com> Date: Tue, 15 Mar 2016 17:19:57 +0300 From: Pavel Tikhomirov MIME-Version: 1.0 To: Seth Forshee CC: Andy Lutomirski , "Eric W. Biederman" , , Serge Hallyn , Alexander Viro , , , , , Konstantin Khorenko , Pavel Emelyanov Subject: Re: [PATCH] fs: remove excess check for in_userns References: <1451930639-94331-4-git-send-email-seth.forshee@canonical.com> <1458043740-14229-1-git-send-email-ptikhomirov@virtuozzo.com> <20160315134545.GB27754@ubuntu-xps13> In-Reply-To: <20160315134545.GB27754@ubuntu-xps13> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 03/15/2016 04:45 PM, Seth Forshee wrote: > On Tue, Mar 15, 2016 at 03:09:00PM +0300, Pavel Tikhomirov wrote: >> If in_userns returns false mnt_may_suid also returns false, and we >> will reach second(removed) if-check only in case it does not trigger, >> so remove it. > > We had a somewhat lengthy discussion previously where one of the > conclusions was that we'd have that check in both places even though > it's redundant. Iirc the reason was that though they're doing the same > test they're doing so to answer different questions, so we should have > the test in both places (or something along those lines). Ok, that is reasonable. But from my POV the edge between the meaning of those checks is quiet blurred. Thanks! > > Thanks, > Seth > -- Best regards, Tikhomirov Pavel Software Developer, Virtuozzo.