mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-07 15:01:44 +00:00
[PATCH] splice: fix page stealing LRU handling.
Originally from Nick Piggin, just adapted to the newer branch. You can't check PageLRU without holding zone->lru_lock. The page release code can get away with it only because the page refcount is 0 at that point. Also, you can't reliably remove pages from the LRU unless the refcount is 0. Ever. Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Jens Axboe <axboe@suse.de>
This commit is contained in:
parent
ad8d6f0a78
commit
3e7ee3e7b3
3 changed files with 18 additions and 19 deletions
|
@ -5,10 +5,14 @@
|
|||
|
||||
#define PIPE_BUFFERS (16)
|
||||
|
||||
#define PIPE_BUF_FLAG_STOLEN 0x01
|
||||
#define PIPE_BUF_FLAG_LRU 0x02
|
||||
|
||||
struct pipe_buffer {
|
||||
struct page *page;
|
||||
unsigned int offset, len;
|
||||
struct pipe_buf_operations *ops;
|
||||
unsigned int flags;
|
||||
};
|
||||
|
||||
struct pipe_buf_operations {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue