eventpoll.c (9d4d8572a539ef807e21c196f145aa365fd52f0e) eventpoll.c (bfe3911a91047557eb0e620f95a370aee6a248c7)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * fs/eventpoll.c (Efficient event retrieval implementation)
4 * Copyright (C) 2001,...,2009 Davide Libenzi
5 *
6 * Davide Libenzi <davidel@xmailserver.org>
7 */
8

--- 965 unchanged lines hidden (view full) ---

974 epir = epi;
975 break;
976 }
977 }
978
979 return epir;
980}
981
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * fs/eventpoll.c (Efficient event retrieval implementation)
4 * Copyright (C) 2001,...,2009 Davide Libenzi
5 *
6 * Davide Libenzi <davidel@xmailserver.org>
7 */
8

--- 965 unchanged lines hidden (view full) ---

974 epir = epi;
975 break;
976 }
977 }
978
979 return epir;
980}
981
982#ifdef CONFIG_CHECKPOINT_RESTORE
982#ifdef CONFIG_KCMP
983static struct epitem *ep_find_tfd(struct eventpoll *ep, int tfd, unsigned long toff)
984{
985 struct rb_node *rbp;
986 struct epitem *epi;
987
988 for (rbp = rb_first_cached(&ep->rbr); rbp; rbp = rb_next(rbp)) {
989 epi = rb_entry(rbp, struct epitem, rbn);
990 if (epi->ffd.fd == tfd) {

--- 25 unchanged lines hidden (view full) ---

1016 if (epi)
1017 file_raw = epi->ffd.file;
1018 else
1019 file_raw = ERR_PTR(-ENOENT);
1020 mutex_unlock(&ep->mtx);
1021
1022 return file_raw;
1023}
983static struct epitem *ep_find_tfd(struct eventpoll *ep, int tfd, unsigned long toff)
984{
985 struct rb_node *rbp;
986 struct epitem *epi;
987
988 for (rbp = rb_first_cached(&ep->rbr); rbp; rbp = rb_next(rbp)) {
989 epi = rb_entry(rbp, struct epitem, rbn);
990 if (epi->ffd.fd == tfd) {

--- 25 unchanged lines hidden (view full) ---

1016 if (epi)
1017 file_raw = epi->ffd.file;
1018 else
1019 file_raw = ERR_PTR(-ENOENT);
1020 mutex_unlock(&ep->mtx);
1021
1022 return file_raw;
1023}
1024#endif /* CONFIG_CHECKPOINT_RESTORE */
1024#endif /* CONFIG_KCMP */
1025
1026/**
1027 * Adds a new entry to the tail of the list in a lockless way, i.e.
1028 * multiple CPUs are allowed to call this function concurrently.
1029 *
1030 * Beware: it is necessary to prevent any other modifications of the
1031 * existing list until all changes are completed, in other words
1032 * concurrent list_add_tail_lockless() calls should be protected

--- 1348 unchanged lines hidden ---
1025
1026/**
1027 * Adds a new entry to the tail of the list in a lockless way, i.e.
1028 * multiple CPUs are allowed to call this function concurrently.
1029 *
1030 * Beware: it is necessary to prevent any other modifications of the
1031 * existing list until all changes are completed, in other words
1032 * concurrent list_add_tail_lockless() calls should be protected

--- 1348 unchanged lines hidden ---