diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-09-23 18:35:36 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-09-23 18:35:36 +0200 |
commit | f8ffbc365f703d74ecca8ca787318d05bbee2bf7 (patch) | |
tree | cdb3e023473e02a186b39fe541eb719ed2ffcb7f /fs/select.c | |
parent | mm: fix build on 32-bit targets without MAX_PHYSMEM_BITS (diff) | |
parent | add struct fd constructors, get rid of __to_fd() (diff) | |
download | linux-f8ffbc365f703d74ecca8ca787318d05bbee2bf7.tar.xz linux-f8ffbc365f703d74ecca8ca787318d05bbee2bf7.zip |
Merge tag 'pull-stable-struct_fd' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull 'struct fd' updates from Al Viro:
"Just the 'struct fd' layout change, with conversion to accessor
helpers"
* tag 'pull-stable-struct_fd' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
add struct fd constructors, get rid of __to_fd()
struct fd: representation change
introduce fd_file(), convert all accessors to it.
Diffstat (limited to 'fs/select.c')
-rw-r--r-- | fs/select.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/select.c b/fs/select.c index 437034ed85c6..a77907faf2b4 100644 --- a/fs/select.c +++ b/fs/select.c @@ -529,10 +529,10 @@ static noinline_for_stack int do_select(int n, fd_set_bits *fds, struct timespec continue; mask = EPOLLNVAL; f = fdget(i); - if (f.file) { + if (fd_file(f)) { wait_key_set(wait, in, out, bit, busy_flag); - mask = vfs_poll(f.file, wait); + mask = vfs_poll(fd_file(f), wait); fdput(f); } @@ -863,13 +863,13 @@ static inline __poll_t do_pollfd(struct pollfd *pollfd, poll_table *pwait, goto out; mask = EPOLLNVAL; f = fdget(fd); - if (!f.file) + if (!fd_file(f)) goto out; /* userland u16 ->events contains POLL... bitmap */ filter = demangle_poll(pollfd->events) | EPOLLERR | EPOLLHUP; pwait->_key = filter | busy_flag; - mask = vfs_poll(f.file, pwait); + mask = vfs_poll(fd_file(f), pwait); if (mask & busy_flag) *can_busy_poll = true; mask &= filter; /* Mask out unneeded events. */ |