mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 16:37:50 +00:00
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>
This commit is contained in:
parent
66924fdaf8
commit
b73a936f99
2 changed files with 16 additions and 3 deletions
|
@ -1242,9 +1242,12 @@ void __brelse(struct buffer_head *bh)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(__brelse);
|
EXPORT_SYMBOL(__brelse);
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* bforget() is like brelse(), except it discards any
|
* __bforget - Discard any dirty data in a buffer.
|
||||||
* potentially dirty data.
|
* @bh: The buffer to forget.
|
||||||
|
*
|
||||||
|
* This variant of bforget() can be called if @bh is guaranteed to not
|
||||||
|
* be NULL.
|
||||||
*/
|
*/
|
||||||
void __bforget(struct buffer_head *bh)
|
void __bforget(struct buffer_head *bh)
|
||||||
{
|
{
|
||||||
|
|
|
@ -325,6 +325,16 @@ static inline void brelse(struct buffer_head *bh)
|
||||||
__brelse(bh);
|
__brelse(bh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* bforget - Discard any dirty data in a buffer.
|
||||||
|
* @bh: The buffer to forget.
|
||||||
|
*
|
||||||
|
* Call this function instead of brelse() if the data written to a buffer
|
||||||
|
* no longer needs to be written back. It will clear the buffer's dirty
|
||||||
|
* flag so writeback of this buffer will be skipped.
|
||||||
|
*
|
||||||
|
* Context: Any context.
|
||||||
|
*/
|
||||||
static inline void bforget(struct buffer_head *bh)
|
static inline void bforget(struct buffer_head *bh)
|
||||||
{
|
{
|
||||||
if (bh)
|
if (bh)
|
||||||
|
|
Loading…
Reference in a new issue