locked_inode...nd_lock_list(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… locked_inode_to_wb_and_lock_list β€” Kernel API Manual πŸ’…

okay so you're reading the Kernel API Manual page for locked_inode_to_wb_and_lock_list(9), and honestly? it's a whole vibe. let's get into it bestie 🫢


✨ NAME ✨

locked_inode_to_wb_and_lock_list β€” figure out which wb a locked inode belongs to, and lock that thing. that's it, that's the job πŸ’β€β™€οΈ


🌸 SYNOPSIS 🌸

struct bdi_writeback * locked_inode_to_wb_and_lock_list (struct inode *inode );

like, it hands you back a struct bdi_writeback * and takes one struct inode *inode. simple. iconic. no cap. ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • inode β€” the inode you're curious about. heads up: you gotta be holding i_lock already, no exceptions, that's the entry fee πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

so it returns the inode's wb with its list_lock held. lockception, we love to see it 😭

the rules, because there are always rules:

  • inode->i_lock must be held on entry πŸ”’
  • it gets released on return (so don't go touching it after, bestie, it's gone)
  • the wb you get back is guaranteed to stay this inode's associated wb until its list_lock is released β€” that's the promise, and she keeps her promises πŸ‘‘

it's giving "trust me bro" but like, in a legally binding kernel way πŸ’€


🌈 SEE ALSO 🌈

all the siblings and cousins, in the kernel file ./fs/fs-writeback.c:


okay that's the whole page!! sourced from ./fs, dated October 2026 β€” go forth and hold your locks correctly, bestie, i believe in you πŸ§šπŸ’– mwah πŸ’‹

πŸ“¦ where this page comes from