__bforget(9)
π
__bforget β Kernel API Manual, section 9 π
okay bestie, gather round, because this one is short but it matters β¨
πΈ NAME πΈ
__bforget β literally just "Discard any dirty data in a buffer." that's the whole vibe. bye-bye dirty data, no cap π
π¦ SYNOPSIS π¦
void __bforget (struct buffer_head *bh );
that's it. one function, one argument, returns void (so likeβ¦ nothing comes back, it just does the thing and dips) π«Ά
π ARGUMENTS π
bhβ The buffer to forget. that's your main character right there π the buffer we're about to ghost.
β¨ DESCRIPTION β¨
so __bforget is the variant of bforget you can call when bh is guaranteed to not be NULL π₯ like, you already did your vibe check, you know it's not NULL, so you skip the safety net and go straight to discarding any dirty data in that buffer. slay. efficient. iconic.
ngl the "guaranteed" part is doing a LOT of work in that sentence β if you're wrong aboutbhnot beingNULL, that's on you, bestie π the page says this variant can be called if that's guaranteed, so keep that promise fr fr π
π SEE ALSO π
Kernel file ./fs/buffer.c β and honestly the whole friend group shows up here, so let's give them their flowers π
bio_endio_bh(9)end_buffer_read_sync(9)bh_end_read(9)bh_end_write(9)bh_end_async_write(9)mmb_sync(9)block_dirty_folio(9)mark_buffer_dirty(9)__brelse(9)bh_submit(9)bdev_getblk(9)__bread_gfp(9)block_invalidate_folio(9)clean_bdev_aliases(9)try_to_free_buffers(9)bh_uptodate_or_lock(9)__bh_read(9)__bh_read_batch(9)
π tiny reminder that this page lives in ./fs, and it's stamped October 2026 β so like, it's from the future, which is very main character energy of it. periodt. π§
okay that's the whole page, mwah π go forth and forget some dirty buffers responsibly π
π¦ 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