[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <175797569637.245695.9797418204966811004.stgit@frogsfrogsfrogs>
Date: Mon, 15 Sep 2025 15:37:58 -0700
From: "Darrick J. Wong" <djwong@...nel.org>
To: tytso@....edu
Cc: linux-ext4@...r.kernel.org, linux-ext4@...r.kernel.org
Subject: [PATCH 01/12] libext2fs: use F_GETFL, not F_GETFD, in unixfd_open
From: Darrick J. Wong <djwong@...nel.org>
F_GETFD is the fcntl command that returns FD_* flags, but the callsite
wants to look at the O_* flags. F_GETFL is the fcntl command that
returns the O_* flags, so change the subcommand to be correct.
Cc: <linux-ext4@...r.kernel.org> # v1.43.2
Fixes: 4ccf9e4fe165cf ("libext2fs: add unixfd_io_manager")
Signed-off-by: "Darrick J. Wong" <djwong@...nel.org>
---
lib/ext2fs/unix_io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c
index cb408f51779aa7..adbdd5f6603d74 100644
--- a/lib/ext2fs/unix_io.c
+++ b/lib/ext2fs/unix_io.c
@@ -1086,7 +1086,7 @@ static errcode_t unixfd_open(const char *str_fd, int flags,
fd = atoi(str_fd);
#if defined(HAVE_FCNTL)
- fd_flags = fcntl(fd, F_GETFD);
+ fd_flags = fcntl(fd, F_GETFL);
if (fd_flags == -1)
return EBADF;
Powered by blists - more mailing lists