mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
buffer_head: remove redundant test from wait_on_buffer
The comment suggests that when b_count equals zero it is calling __wait_no_buffer to trigger some debug, but as there is no debug in __wait_on_buffer the whole thing is redundant. AFAICT from the git log this has been the case for at least 5 years, so it seems safe just to remove this. Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Cc: Jens Axboe <axboe@kernel.dk> Cc: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
76545066c8
commit
a9877cc293
1 changed files with 1 additions and 6 deletions
|
@ -314,15 +314,10 @@ map_bh(struct buffer_head *bh, struct super_block *sb, sector_t block)
|
||||||
bh->b_size = sb->s_blocksize;
|
bh->b_size = sb->s_blocksize;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Calling wait_on_buffer() for a zero-ref buffer is illegal, so we call into
|
|
||||||
* __wait_on_buffer() just to trip a debug check. Because debug code in inline
|
|
||||||
* functions is bloaty.
|
|
||||||
*/
|
|
||||||
static inline void wait_on_buffer(struct buffer_head *bh)
|
static inline void wait_on_buffer(struct buffer_head *bh)
|
||||||
{
|
{
|
||||||
might_sleep();
|
might_sleep();
|
||||||
if (buffer_locked(bh) || atomic_read(&bh->b_count) == 0)
|
if (buffer_locked(bh))
|
||||||
__wait_on_buffer(bh);
|
__wait_on_buffer(bh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue