generic_pipe_buf_try_steal(9)
π generic_pipe_buf_try_steal β like, the kernel-API-manual-page-9 edition π
okay so bestie, welcome to generic_pipe_buf_try_steal(9), from the Kernel API Manual (section 9, obviously, iykyk). this one is a little function with main character energy: it just wants to take a page and make it hers. let's get into it β¨
β¨ NAME β¨
generic_pipe_buf_try_steal β attempt to take ownership of a &pipe_buffer π«Ά
πΈ SYNOPSIS πΈ
bool generic_pipe_buf_try_steal (struct pipe_inode_info *pipe , struct
pipe_buffer *buf );
literally that's it, two pointers and a bool. she's lowkey minimalist π
π¦ ARGUMENTS π¦
pipeβ the pipe that the buffer belongs to. like, the whole situation this buffer is living in π°bufβ the buffer to attempt to steal. yes. we're stealing it. not in a mean way. in a reuse way π₯°
π DESCRIPTION π
so this function attempts to steal the struct page attached to buf. iconique behavior, honestly.
if it's successful, this function returns 0 and returns with the page locked. and the caller may then reuse the page for whatever he wishes β the typical use is insertion into a different file page cache. no cap, that's the whole vibe: snatch the page, lock it, hand it off, go put it somewhere else π
ngl, returning0from aboolon success is giving "we don't follow the rules, we are the rules". just letting you know what the page says, bestie, don't come for me π
π SEE ALSO π
- Kernel file
./fs/pipe.c generic_pipe_buf_get(9)generic_pipe_buf_release(9)
go read those too, fr fr, they're the rest of the friend group πΈ
and that's the tea π this absolute baddie of a page lives in ./fs and is dated October 2026, filed under generic_pipe_buf_try_steal(9). slay, periodt, thanks for coming to my ted talk ππ§
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms