Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24477
b: refs/heads/master
c: e4a1f12
h: refs/heads/master
i:
  24475: c541128
v: v3
  • Loading branch information
Eric Dumazet authored and Linus Torvalds committed Mar 28, 2006
1 parent 080516f commit 5e09e26
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 70674f95c0a2ea694d5c39f4e514f538a09be36f
refs/heads/master: e4a1f129f9e43a5e5d28fe6d1b214246a398cdce
10 changes: 6 additions & 4 deletions trunk/fs/select.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,17 +231,18 @@ int do_select(int n, fd_set_bits *fds, s64 *timeout)
}

for (j = 0; j < __NFDBITS; ++j, ++i, bit <<= 1) {
int fput_needed;
if (i >= n)
break;
if (!(bit & all_bits))
continue;
file = fget(i);
file = fget_light(i, &fput_needed);
if (file) {
f_op = file->f_op;
mask = DEFAULT_POLLMASK;
if (f_op && f_op->poll)
mask = (*f_op->poll)(file, retval ? NULL : wait);
fput(file);
fput_light(file, fput_needed);
if ((mask & POLLIN_SET) && (in & bit)) {
res_in |= bit;
retval++;
Expand Down Expand Up @@ -557,14 +558,15 @@ static void do_pollfd(unsigned int num, struct pollfd * fdpage,
fdp = fdpage+i;
fd = fdp->fd;
if (fd >= 0) {
struct file * file = fget(fd);
int fput_needed;
struct file * file = fget_light(fd, &fput_needed);
mask = POLLNVAL;
if (file != NULL) {
mask = DEFAULT_POLLMASK;
if (file->f_op && file->f_op->poll)
mask = file->f_op->poll(file, *pwait);
mask &= fdp->events | POLLERR | POLLHUP;
fput(file);
fput_light(file, fput_needed);
}
if (mask) {
*pwait = NULL;
Expand Down

0 comments on commit 5e09e26

Please sign in to comment.