File tree Expand file tree Collapse file tree 2 files changed +3
-15
lines changed Expand file tree Collapse file tree 2 files changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -576,7 +576,6 @@ struct io_close {
576
576
struct file * file ;
577
577
int fd ;
578
578
u32 file_slot ;
579
- u32 flags ;
580
579
};
581
580
582
581
struct io_timeout_data {
@@ -5966,18 +5965,14 @@ static int io_statx(struct io_kiocb *req, unsigned int issue_flags)
5966
5965
5967
5966
static int io_close_prep (struct io_kiocb * req , const struct io_uring_sqe * sqe )
5968
5967
{
5969
- if (sqe -> off || sqe -> addr || sqe -> len || sqe -> buf_index )
5968
+ if (sqe -> off || sqe -> addr || sqe -> len || sqe -> rw_flags || sqe -> buf_index )
5970
5969
return - EINVAL ;
5971
5970
if (req -> flags & REQ_F_FIXED_FILE )
5972
5971
return - EBADF ;
5973
5972
5974
5973
req -> close .fd = READ_ONCE (sqe -> fd );
5975
5974
req -> close .file_slot = READ_ONCE (sqe -> file_index );
5976
- req -> close .flags = READ_ONCE (sqe -> close_flags );
5977
- if (req -> close .flags & ~IORING_CLOSE_FD_AND_FILE_SLOT )
5978
- return - EINVAL ;
5979
- if (!(req -> close .flags & IORING_CLOSE_FD_AND_FILE_SLOT ) &&
5980
- req -> close .file_slot && req -> close .fd )
5975
+ if (req -> close .file_slot && req -> close .fd )
5981
5976
return - EINVAL ;
5982
5977
5983
5978
return 0 ;
@@ -5993,8 +5988,7 @@ static int io_close(struct io_kiocb *req, unsigned int issue_flags)
5993
5988
5994
5989
if (req -> close .file_slot ) {
5995
5990
ret = io_close_fixed (req , issue_flags );
5996
- if (ret || !(req -> close .flags & IORING_CLOSE_FD_AND_FILE_SLOT ))
5997
- goto err ;
5991
+ goto err ;
5998
5992
}
5999
5993
6000
5994
spin_lock (& files -> file_lock );
Original file line number Diff line number Diff line change @@ -47,7 +47,6 @@ struct io_uring_sqe {
47
47
__u32 unlink_flags ;
48
48
__u32 hardlink_flags ;
49
49
__u32 xattr_flags ;
50
- __u32 close_flags ;
51
50
};
52
51
__u64 user_data ; /* data to be passed back at completion time */
53
52
/* pack this to avoid bogus arm OABI complaints */
@@ -259,11 +258,6 @@ enum io_uring_op {
259
258
*/
260
259
#define IORING_ACCEPT_MULTISHOT (1U << 0)
261
260
262
- /*
263
- * close flags, store in sqe->close_flags
264
- */
265
- #define IORING_CLOSE_FD_AND_FILE_SLOT (1U << 0)
266
-
267
261
/*
268
262
* IO completion data structure (Completion Queue Entry)
269
263
*/
You can’t perform that action at this time.
0 commit comments