summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/cache.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-01-30 20:58:07 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2018-01-30 20:58:07 -0500
commit168fe32a072a4b8dc81a3aebf0e5e588d38e2955 (patch)
tree297f0f6192256785979f5ebfb92797f81754548d /net/sunrpc/cache.c
parent13ddd1667e7f01071cdf120132238ffca004a88e (diff)
parentc71d227fc4133f949dae620ed5e3a250b43f2415 (diff)
Merge branch 'misc.poll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull poll annotations from Al Viro: "This introduces a __bitwise type for POLL### bitmap, and propagates the annotations through the tree. Most of that stuff is as simple as 'make ->poll() instances return __poll_t and do the same to local variables used to hold the future return value'. Some of the obvious brainos found in process are fixed (e.g. POLLIN misspelled as POLL_IN). At that point the amount of sparse warnings is low and most of them are for genuine bugs - e.g. ->poll() instance deciding to return -EINVAL instead of a bitmap. I hadn't touched those in this series - it's large enough as it is. Another problem it has caught was eventpoll() ABI mess; select.c and eventpoll.c assumed that corresponding POLL### and EPOLL### were equal. That's true for some, but not all of them - EPOLL### are arch-independent, but POLL### are not. The last commit in this series separates userland POLL### values from the (now arch-independent) kernel-side ones, converting between them in the few places where they are copied to/from userland. AFAICS, this is the least disruptive fix preserving poll(2) ABI and making epoll() work on all architectures. As it is, it's simply broken on sparc - try to give it EPOLLWRNORM and it will trigger only on what would've triggered EPOLLWRBAND on other architectures. EPOLLWRBAND and EPOLLRDHUP, OTOH, are never triggered at all on sparc. With this patch they should work consistently on all architectures" * 'misc.poll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (37 commits) make kernel-side POLL... arch-independent eventpoll: no need to mask the result of epi_item_poll() again eventpoll: constify struct epoll_event pointers debugging printk in sg_poll() uses %x to print POLL... bitmap annotate poll(2) guts 9p: untangle ->poll() mess ->si_band gets POLL... bitmap stored into a user-visible long field ring_buffer_poll_wait() return value used as return value of ->poll() the rest of drivers/*: annotate ->poll() instances media: annotate ->poll() instances fs: annotate ->poll() instances ipc, kernel, mm: annotate ->poll() instances net: annotate ->poll() instances apparmor: annotate ->poll() instances tomoyo: annotate ->poll() instances sound: annotate ->poll() instances acpi: annotate ->poll() instances crypto: annotate ->poll() instances block: annotate ->poll() instances x86: annotate ->poll() instances ...
Diffstat (limited to 'net/sunrpc/cache.c')
-rw-r--r--net/sunrpc/cache.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
index e68943895be4..aa36dad32db1 100644
--- a/net/sunrpc/cache.c
+++ b/net/sunrpc/cache.c
@@ -930,10 +930,10 @@ out:
930 930
931static DECLARE_WAIT_QUEUE_HEAD(queue_wait); 931static DECLARE_WAIT_QUEUE_HEAD(queue_wait);
932 932
933static unsigned int cache_poll(struct file *filp, poll_table *wait, 933static __poll_t cache_poll(struct file *filp, poll_table *wait,
934 struct cache_detail *cd) 934 struct cache_detail *cd)
935{ 935{
936 unsigned int mask; 936 __poll_t mask;
937 struct cache_reader *rp = filp->private_data; 937 struct cache_reader *rp = filp->private_data;
938 struct cache_queue *cq; 938 struct cache_queue *cq;
939 939
@@ -1501,7 +1501,7 @@ static ssize_t cache_write_procfs(struct file *filp, const char __user *buf,
1501 return cache_write(filp, buf, count, ppos, cd); 1501 return cache_write(filp, buf, count, ppos, cd);
1502} 1502}
1503 1503
1504static unsigned int cache_poll_procfs(struct file *filp, poll_table *wait) 1504static __poll_t cache_poll_procfs(struct file *filp, poll_table *wait)
1505{ 1505{
1506 struct cache_detail *cd = PDE_DATA(file_inode(filp)); 1506 struct cache_detail *cd = PDE_DATA(file_inode(filp));
1507 1507
@@ -1720,7 +1720,7 @@ static ssize_t cache_write_pipefs(struct file *filp, const char __user *buf,
1720 return cache_write(filp, buf, count, ppos, cd); 1720 return cache_write(filp, buf, count, ppos, cd);
1721} 1721}
1722 1722
1723static unsigned int cache_poll_pipefs(struct file *filp, poll_table *wait) 1723static __poll_t cache_poll_pipefs(struct file *filp, poll_table *wait)
1724{ 1724{
1725 struct cache_detail *cd = RPC_I(file_inode(filp))->private; 1725 struct cache_detail *cd = RPC_I(file_inode(filp))->private;
1726 1726