Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

buffer: add kernel-doc for bforget() and __bforget()

Distinguish these functions from brelse() and __brelse().

Link: https://lkml.kernel.org/r/20240416031754.4076917-7-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Pankaj Raghav <p.raghav@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Matthew Wilcox (Oracle) and committed by
Andrew Morton
b73a936f 66924fda

+16 -3
+6 -3
fs/buffer.c
··· 1242 1242 } 1243 1243 EXPORT_SYMBOL(__brelse); 1244 1244 1245 - /* 1246 - * bforget() is like brelse(), except it discards any 1247 - * potentially dirty data. 1245 + /** 1246 + * __bforget - Discard any dirty data in a buffer. 1247 + * @bh: The buffer to forget. 1248 + * 1249 + * This variant of bforget() can be called if @bh is guaranteed to not 1250 + * be NULL. 1248 1251 */ 1249 1252 void __bforget(struct buffer_head *bh) 1250 1253 {
+10
include/linux/buffer_head.h
··· 325 325 __brelse(bh); 326 326 } 327 327 328 + /** 329 + * bforget - Discard any dirty data in a buffer. 330 + * @bh: The buffer to forget. 331 + * 332 + * Call this function instead of brelse() if the data written to a buffer 333 + * no longer needs to be written back. It will clear the buffer's dirty 334 + * flag so writeback of this buffer will be skipped. 335 + * 336 + * Context: Any context. 337 + */ 328 338 static inline void bforget(struct buffer_head *bh) 329 339 { 330 340 if (bh)