Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1906039imm; Sun, 8 Jul 2018 14:09:13 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfzV0C/PtHanvYJVc3Tfm6mW/dKzVVQfJMBYJSfYi2VIBCa4ezxSXWH53m6QIG2HEv0Voig X-Received: by 2002:a17:902:7009:: with SMTP id y9-v6mr17956113plk.217.1531084153342; Sun, 08 Jul 2018 14:09:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531084153; cv=none; d=google.com; s=arc-20160816; b=hR0Pwx4wY3r/IGUFO8JGym3UDR8qa412CYRrjmpc/N3lqmh12fQDtlPOVnLp03cDKp kvapxGW1uws8tt8+ds2kTJ2EBsS++Dh3kFt1aa+Em/cb0TTlNnPs/CF8+HNCPonLMfSc wWyZ9K6pRtYb8p98DatWICguXWdIywOOK5W1HRZYIKN1UGqC0crOrVYSlK3qeF4Vx4kL kvOvTT+HL3Qd+ie4ukKBJ+Mxw37wmipSTD7PmHk9ueq0bAYJt2phCuMMV7tiA0BCa/Hn pxs/odTpvfxJDwE4ZZAcdejjrtfI9c5f4pHrjuTlK1SY7DsT7PuQ12bF7kDIzjb5Q901 R4AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=UFGxkFlELgjhqT2bEflX7XbN3XOBafTI2yVmVpjVghg=; b=TwGb15wrEu319NtQ2w4y0uQvsT99ezsqmJG/PLItzNLhlqzNVecuC8L1tsPXbH/8yh weWEB07n8o1jyrM+HqHEuZsUyMJDnc/9+3i3GDhldcXdNzIp5pKsvvHk7ymohCjRKcRj 3v8aJP1+eTtyBM0qHkIT6pYiw36wgc/1QX+sd/JFR/rs+sAicLWrkhHxIxlNn2Zs7CN3 MVvSZOOrr34PyUzWBuo7hcyGiWfYvP9OcksXb4xmtj3/sFGLpujlPUqa/dQo1W7DmAq1 546wL1gHiG32cLpN3Xa2rvpTmf0OMeAr30k1ungMzeuPCNNEPUcdUYm5hXMGce/ycFAJ bDyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tNE5sByR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cd5-v6si13448106plb.174.2018.07.08.14.08.59; Sun, 08 Jul 2018 14:09:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tNE5sByR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933362AbeGHVFn (ORCPT + 99 others); Sun, 8 Jul 2018 17:05:43 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:43048 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933317AbeGHVFk (ORCPT ); Sun, 8 Jul 2018 17:05:40 -0400 Received: by mail-pg1-f194.google.com with SMTP id v13-v6so844416pgr.10; Sun, 08 Jul 2018 14:05:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UFGxkFlELgjhqT2bEflX7XbN3XOBafTI2yVmVpjVghg=; b=tNE5sByRKXhDtRE1WuZ4c9Gokcs8/E8TKx2XGADQeaAeHwE5EqTJ3w3we7CsEuZZSZ iYGrWCRvuZaGAgCvUcx3bLid55hVECJ/7Bfu1HowBiHCWJp0T8N4Y4bZmNGJWi0prrF5 03A0EOL+7A3WJ6mISZ1BijPBPQgRFQ5hmxJ4Q18REVCWN1Js/QLW4PLB4fEJ2M448W23 OmVz6nvOybWyzLTaQSfGCtUk30poYbeViWsDVUQWE9mKKVLQGJpfbYAVkFMa+yl1CHsw Nem28NmzPmnDkWXPuuHkBBRn4e6+eIohOnj5Ts2cx/lBHbk580a1CJJ5Rm1dFTZPCFYt Pxfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=UFGxkFlELgjhqT2bEflX7XbN3XOBafTI2yVmVpjVghg=; b=V1W8P+R3UTh3fHGxljCmY5rEq3Wc1XCffaPK9mT9n3ukh/7CvONP0h5tEMJoC53ouj VN+/8XPLzl/bBbpvdf8t2bsLATsuk/lkoP5kkbLd/6Em23cthBNAr5z8q8B1YA+Gsucs NlFTb3FcsaNEOgmOa1zgzIVPOik4u0GpiH0k600wcHgmOmW2ehPItkPPxlDH5bT1W1Ky +xhVoKx1fRNlTL+gG812yfCcdWu2JsRlIqQFCKqAzRjrfXz9lyBi/YMZAK3MS7HDZRc9 BZ0hsOd5TazaPUMJLLxqE0gSAs9sUjrx8BZCpz2c/Q2nTl2pBQhnHx75j7qrkTh+nlUT EtyA== X-Gm-Message-State: APt69E3vUJUKdTC9XFUoeFMsuvSljEVffv85XRiOPpOBcqNYP6o9fFLN 7DWVCBsS0W/Ea4hjP3hjw3Q= X-Received: by 2002:a62:6303:: with SMTP id x3-v6mr18710274pfb.91.1531083939531; Sun, 08 Jul 2018 14:05:39 -0700 (PDT) Received: from sol.localdomain (c-67-185-97-198.hsd1.wa.comcast.net. [67.185.97.198]) by smtp.gmail.com with ESMTPSA id x68-v6sm23355681pfb.138.2018.07.08.14.05.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Jul 2018 14:05:39 -0700 (PDT) From: Eric Biggers To: David Howells , Alexander Viro , linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Eric Biggers Subject: [PATCH 08/18] fsmount: pass up error code from dentry_open() Date: Sun, 8 Jul 2018 14:01:44 -0700 Message-Id: <20180708210154.10423-9-ebiggers3@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180708210154.10423-1-ebiggers3@gmail.com> References: <20180708210154.10423-1-ebiggers3@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eric Biggers Fixes: 0c65353ab9f5 ("vfs: Implement fsmount() to effect a pre-configured mount") Signed-off-by: Eric Biggers --- fs/namespace.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/namespace.c b/fs/namespace.c index 6f0701a03a2b3..9cde133d0a9c4 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -3333,8 +3333,10 @@ SYSCALL_DEFINE3(fsmount, int, fs_fd, unsigned int, flags, unsigned int, ms_flags * it, not just simply put it. */ file = dentry_open(&newmount, O_PATH, fc->cred); - if (IS_ERR(file)) + if (IS_ERR(file)) { + ret = PTR_ERR(file); goto err_path; + } file->f_mode |= FMODE_NEED_UNMOUNT; ret = get_unused_fd_flags(flags & FSMOUNT_CLOEXEC); -- 2.18.0