get_nth_bh(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ get_nth_bh(9) β€” Kernel API Manual πŸŽ€

okay so bestie, we’re in the Kernel API Manual and this page is all about get_nth_bh(9). it’s giving β€œbuffer meet buffer, but make it a count” energy, and honestly? iconic. πŸ’…


✨ NAME ✨

get_nth_bh β€” Get a reference on the n'th buffer after this one. 🫢


🌸 SYNOPSIS 🌸

struct buffer_head * get_nth_bh (struct buffer_head *bh , unsigned int
       count );

πŸ’– ARGUMENTS πŸ’–

  • bh β€” The buffer to start counting from. like, your starting point, bestie. πŸŽ€
  • count β€” How many buffers to skip. the β€œhow many” number. ⭐

πŸ¦‹ DESCRIPTION πŸ¦‹

This is primarily useful for finding the nth buffer in a folio. in that case you pass the head buffer and the byte offset in the folio divided by the block size. no cap, that’s the main character use case. πŸ‘‘

It can be used for other purposes, but it will wrap at the end of the folio rather than returning NULL or proceeding to the next folio for you. so yeah β€” it’s not gonna hand you NULL, and it’s not gonna skip to the next folio on your behalf. it wraps. periodt. πŸ’€


πŸ”₯ RETURN πŸ”₯

The requested buffer, with an elevated refcount. that’s it, that’s the tea. πŸ“


🌈 SEE ALSO 🌈


okay bye bestie β€” source/version: ./include/linux, dated October 2026 πŸ’–βœ¨

πŸ“¦ where this page comes from