Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1907175imm; Sun, 8 Jul 2018 14:11:04 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfjpI72Ag0OlsPKp8BJaHgXDBe0VSIxY7NnuMpIKjLxihsNkVQkNhP+Y26q9tvb7Hb4EpKn X-Received: by 2002:a17:902:7043:: with SMTP id h3-v6mr18103637plt.269.1531084264711; Sun, 08 Jul 2018 14:11:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531084264; cv=none; d=google.com; s=arc-20160816; b=NYmZHfO3BADhqkpA+UywkeCsbnQgnLoxAy1lPTrzuL+KwMqTpqEGDpjWh58j1Hc1od 9JXe+9Xq6/xAl6/a4hAKZOXu+bAXinA2u4W0ZoylQQ0HDU5sGSqOx1dLGIs1uBCqe4k2 PRkg5f9Hx7MKODNkmwwJrbEmUDf9BlFUIGdE9c5Or0OoTs7KwO9T+CgA/aSRBMScjSfH tq10xN8G/rTCN5+p1TISVXFGhOQGQOGoAy9nlNZa0QEndJzBj4r4Y2/EKo3VW01cr82P n5XGBA/okhxrRWE3zoz6wY1PN/cCpvA03uv+lPxrsWJSQRR+uemZxr3ydpLg4nUlQ9g1 HopA== 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=TZvP7xzX2M/u7KGjTkhIerCLDk/27sw7BMl9bNxyCSE=; b=Xfg4i7dT3Gexkz2CH8Yk3TXJCWSJxkp79ja1nYVocLHO6Z+rKTI7BLwS2N5QvMDmWE T1owjrNZMeqC5jhKe1QrhalDAGhTW2plJA9eJHb4C2rrUeeg5hRT+VIDVGJiG53ercIY 2gLwzvTHXELS/eOmX3y/+Lg8/VU/CHrhnQN6wJWHSyxRBP98nD6JrQRmGkfOEjbgX409 O/pzFE0xQX1wJlHN8+rOPI/oNOZHWzWMozem+KcoUkuuMmHnWBeHL6/inwSZMojInMNz wtpwBnefFZx6ROSe+tIrQ/GPe7Myt5aCN62SMHmMR/w1pv3MECK0b1uep5+U7GYzcc1r m/RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=T6svWdLr; 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 c13-v6si12429668pga.413.2018.07.08.14.10.50; Sun, 08 Jul 2018 14:11:04 -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=T6svWdLr; 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 S933611AbeGHVIT (ORCPT + 99 others); Sun, 8 Jul 2018 17:08:19 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:40564 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933241AbeGHVFl (ORCPT ); Sun, 8 Jul 2018 17:05:41 -0400 Received: by mail-pf0-f196.google.com with SMTP id z24-v6so12151717pfe.7; Sun, 08 Jul 2018 14:05:40 -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=TZvP7xzX2M/u7KGjTkhIerCLDk/27sw7BMl9bNxyCSE=; b=T6svWdLrvU3owQ7EoLQ2t5UWHbd5qWssqn930z6cG/74DYzdZ6DcjQ78I1XGbjMzzv EayTbuXDSFT9GybtbMnZv0J9Mex3DPtR5Mq2yMxZnK/I0szFXxTu0HLmyzx96zpS7seM ksec9i46UTEtC0R3C66DRlhraLM/1/5xJAoVuN+YN99fwsnfL094LE4TJVnPmL2slr4t s+qdfJGhTrN28vHnWUyKt4wSorpPudkVv79Anpf2Tgxb6RjDc1oza+BChX1jN/7v+PNi rnkOhVLZKo6PwkG4QXBzYDnGvZIC01xyeYrF+i8CvMq3XuDlJhB/NJPOrkcJ1FIQFob4 rNIw== 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=TZvP7xzX2M/u7KGjTkhIerCLDk/27sw7BMl9bNxyCSE=; b=ftW/AONbR6M1eQt1zpkO8Hy6ryijizFy4U42E69weYyFDqD4bgDzYKzQ3DRhVkFITx W23Os5ROTNDtnzKseQpdfAlUK7lfxLmf+XPAzQDD1/i1UoWuqPnxF+WT8S23wSS5GMu5 ZITVScrVhIfG8e44uvCBEjdfV7zgJVTK7mqzxFf5MYhCDW8L5fg927UAIjIG6HvtAbLe n28O+/xy302aHe06lWhKAPG/t2CJ6E7aCSdVRAOlbZAxZKzV6j10QfCwOCkInAwSyO+v ryf7HjFSCmL9FtFpjOLwmlZgkCjjerntr0tRTfp/myjc6Y59YeLuA44ikM+pPH+Nc5bR Ol9Q== X-Gm-Message-State: APt69E2ezqrobEnd2rVY6BoyQUmVejFDitnI1AOyffEe7mRWTxCsEtjl H41XaSYb6Dy0SgtMSM4zXWk= X-Received: by 2002:a62:2541:: with SMTP id l62-v6mr18812910pfl.0.1531083940365; Sun, 08 Jul 2018 14:05:40 -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.39 (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 09/18] fsmount: fix handling FSMOUNT_CLOEXEC Date: Sun, 8 Jul 2018 14:01:45 -0700 Message-Id: <20180708210154.10423-10-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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/namespace.c b/fs/namespace.c index 9cde133d0a9c4..8ac9e8fb31c9f 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -3339,7 +3339,7 @@ SYSCALL_DEFINE3(fsmount, int, fs_fd, unsigned int, flags, unsigned int, ms_flags } file->f_mode |= FMODE_NEED_UNMOUNT; - ret = get_unused_fd_flags(flags & FSMOUNT_CLOEXEC); + ret = get_unused_fd_flags((flags & FSMOUNT_CLOEXEC) ? O_CLOEXEC : 0); if (ret >= 0) fd_install(ret, file); else -- 2.18.0