[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180708210154.10423-10-ebiggers3@gmail.com>
Date: Sun, 8 Jul 2018 14:01:45 -0700
From: Eric Biggers <ebiggers3@...il.com>
To: David Howells <dhowells@...hat.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
linux-fsdevel@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, Eric Biggers <ebiggers@...gle.com>
Subject: [PATCH 09/18] fsmount: fix handling FSMOUNT_CLOEXEC
From: Eric Biggers <ebiggers@...gle.com>
Fixes: 0c65353ab9f5 ("vfs: Implement fsmount() to effect a pre-configured mount")
Signed-off-by: Eric Biggers <ebiggers@...gle.com>
---
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
Powered by blists - more mailing lists