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

buffer: improve bdev_getblk documentation

Add some more information about the state of the buffer_head returned.

Link: https://lkml.kernel.org/r/20240416031754.4076917-8-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@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
0b116ff4 b73a936f

+5
+5
fs/buffer.c
··· 1424 1424 * @size: The size of buffer_heads for this @bdev. 1425 1425 * @gfp: The memory allocation flags to use. 1426 1426 * 1427 + * The returned buffer head has its reference count incremented, but is 1428 + * not locked. The caller should call brelse() when it has finished 1429 + * with the buffer. The buffer may not be uptodate. If needed, the 1430 + * caller can bring it uptodate either by reading it or overwriting it. 1431 + * 1427 1432 * Return: The buffer head, or NULL if memory could not be allocated. 1428 1433 */ 1429 1434 struct buffer_head *bdev_getblk(struct block_device *bdev, sector_t block,