All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Kellermann <mk@cm4all.com>
To: axboe@kernel.dk, linux-fsdevel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Max Kellermann <mk@cm4all.com>
Subject: [PATCH v2 2/2] fs/io_uring: remove unused flag fd_non_neg
Date: Fri,  8 May 2020 08:38:46 +0200	[thread overview]
Message-ID: <20200508063846.21067-2-mk@cm4all.com> (raw)
In-Reply-To: <20200508063846.21067-1-mk@cm4all.com>

---
 fs/io_uring.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index d24f8e33323c..0aa7cd547ced 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -604,8 +604,6 @@ struct io_op_def {
 	unsigned		needs_mm : 1;
 	/* needs req->file assigned */
 	unsigned		needs_file : 1;
-	/* needs req->file assigned IFF fd is >= 0 */
-	unsigned		fd_non_neg : 1;
 	/* hash wq insertion if file is a regular file */
 	unsigned		hash_reg_file : 1;
 	/* unbound wq insertion if file is a non-regular file */
@@ -4572,8 +4570,6 @@ static int io_req_needs_file(struct io_kiocb *req, int fd)
 {
 	if (!io_op_defs[req->opcode].needs_file)
 		return 0;
-	if ((fd == -1 || fd == AT_FDCWD) && io_op_defs[req->opcode].fd_non_neg)
-		return 0;
 	return 1;
 }
 
-- 
2.20.1


  reply	other threads:[~2020-05-08  6:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-08  6:38 [PATCH v2 1/2] fs/io_uring: fix O_PATH fds in openat, openat2, statx Max Kellermann
2020-05-08  6:38 ` Max Kellermann [this message]
2020-05-08  6:40 ` Max Kellermann
2020-05-08 15:29   ` Jens Axboe
2020-05-09 12:30 ` Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200508063846.21067-2-mk@cm4all.com \
    --to=mk@cm4all.com \
    --cc=axboe@kernel.dk \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.