mirror of https://gitee.com/openkylin/linux.git
tomoyo: annotate ->poll() instances
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
680ef72abd
commit
c0d4be289e
|
@ -458,7 +458,7 @@ void tomoyo_read_log(struct tomoyo_io_buffer *head)
|
||||||
*
|
*
|
||||||
* Returns POLLIN | POLLRDNORM when ready to read an audit log.
|
* Returns POLLIN | POLLRDNORM when ready to read an audit log.
|
||||||
*/
|
*/
|
||||||
unsigned int tomoyo_poll_log(struct file *file, poll_table *wait)
|
__poll_t tomoyo_poll_log(struct file *file, poll_table *wait)
|
||||||
{
|
{
|
||||||
if (tomoyo_log_count)
|
if (tomoyo_log_count)
|
||||||
return POLLIN | POLLRDNORM;
|
return POLLIN | POLLRDNORM;
|
||||||
|
|
|
@ -2120,7 +2120,7 @@ static struct tomoyo_domain_info *tomoyo_find_domain_by_qid
|
||||||
*
|
*
|
||||||
* Waits for access requests which violated policy in enforcing mode.
|
* Waits for access requests which violated policy in enforcing mode.
|
||||||
*/
|
*/
|
||||||
static unsigned int tomoyo_poll_query(struct file *file, poll_table *wait)
|
static __poll_t tomoyo_poll_query(struct file *file, poll_table *wait)
|
||||||
{
|
{
|
||||||
if (!list_empty(&tomoyo_query_list))
|
if (!list_empty(&tomoyo_query_list))
|
||||||
return POLLIN | POLLRDNORM;
|
return POLLIN | POLLRDNORM;
|
||||||
|
@ -2453,7 +2453,7 @@ int tomoyo_open_control(const u8 type, struct file *file)
|
||||||
* Returns POLLIN | POLLRDNORM | POLLOUT | POLLWRNORM if ready to read/write,
|
* Returns POLLIN | POLLRDNORM | POLLOUT | POLLWRNORM if ready to read/write,
|
||||||
* POLLOUT | POLLWRNORM otherwise.
|
* POLLOUT | POLLWRNORM otherwise.
|
||||||
*/
|
*/
|
||||||
unsigned int tomoyo_poll_control(struct file *file, poll_table *wait)
|
__poll_t tomoyo_poll_control(struct file *file, poll_table *wait)
|
||||||
{
|
{
|
||||||
struct tomoyo_io_buffer *head = file->private_data;
|
struct tomoyo_io_buffer *head = file->private_data;
|
||||||
if (head->poll)
|
if (head->poll)
|
||||||
|
|
|
@ -789,7 +789,7 @@ struct tomoyo_acl_param {
|
||||||
struct tomoyo_io_buffer {
|
struct tomoyo_io_buffer {
|
||||||
void (*read) (struct tomoyo_io_buffer *);
|
void (*read) (struct tomoyo_io_buffer *);
|
||||||
int (*write) (struct tomoyo_io_buffer *);
|
int (*write) (struct tomoyo_io_buffer *);
|
||||||
unsigned int (*poll) (struct file *file, poll_table *wait);
|
__poll_t (*poll) (struct file *file, poll_table *wait);
|
||||||
/* Exclusive lock for this structure. */
|
/* Exclusive lock for this structure. */
|
||||||
struct mutex io_sem;
|
struct mutex io_sem;
|
||||||
char __user *read_user_buf;
|
char __user *read_user_buf;
|
||||||
|
@ -981,8 +981,8 @@ int tomoyo_path_number_perm(const u8 operation, const struct path *path,
|
||||||
unsigned long number);
|
unsigned long number);
|
||||||
int tomoyo_path_perm(const u8 operation, const struct path *path,
|
int tomoyo_path_perm(const u8 operation, const struct path *path,
|
||||||
const char *target);
|
const char *target);
|
||||||
unsigned int tomoyo_poll_control(struct file *file, poll_table *wait);
|
__poll_t tomoyo_poll_control(struct file *file, poll_table *wait);
|
||||||
unsigned int tomoyo_poll_log(struct file *file, poll_table *wait);
|
__poll_t tomoyo_poll_log(struct file *file, poll_table *wait);
|
||||||
int tomoyo_socket_bind_permission(struct socket *sock, struct sockaddr *addr,
|
int tomoyo_socket_bind_permission(struct socket *sock, struct sockaddr *addr,
|
||||||
int addr_len);
|
int addr_len);
|
||||||
int tomoyo_socket_connect_permission(struct socket *sock,
|
int tomoyo_socket_connect_permission(struct socket *sock,
|
||||||
|
|
|
@ -157,7 +157,7 @@ static int tomoyo_release(struct inode *inode, struct file *file)
|
||||||
* Returns POLLIN | POLLRDNORM | POLLOUT | POLLWRNORM if ready to read/write,
|
* Returns POLLIN | POLLRDNORM | POLLOUT | POLLWRNORM if ready to read/write,
|
||||||
* POLLOUT | POLLWRNORM otherwise.
|
* POLLOUT | POLLWRNORM otherwise.
|
||||||
*/
|
*/
|
||||||
static unsigned int tomoyo_poll(struct file *file, poll_table *wait)
|
static __poll_t tomoyo_poll(struct file *file, poll_table *wait)
|
||||||
{
|
{
|
||||||
return tomoyo_poll_control(file, wait);
|
return tomoyo_poll_control(file, wait);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue