linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext2: add missing brelse() in ext2_new_inode()
@ 2019-05-30 10:10 Chengguang Xu
  2019-05-30 11:35 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Chengguang Xu @ 2019-05-30 10:10 UTC (permalink / raw)
  To: jack; +Cc: linux-ext4, Chengguang Xu

There is a missing brelse of bitmap_bh in an error
path of ext2_new_inode().

Signed-off-by: Chengguang Xu <cgxu519@zoho.com.cn>
---
 fs/ext2/ialloc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c
index 334dea4e499d..fda7d3f5b4be 100644
--- a/fs/ext2/ialloc.c
+++ b/fs/ext2/ialloc.c
@@ -509,6 +509,7 @@ struct inode *ext2_new_inode(struct inode *dir, umode_t mode,
 	/*
 	 * Scanned all blockgroups.
 	 */
+	brelse(bitmap_bh);
 	err = -ENOSPC;
 	goto fail;
 got:
-- 
2.20.1




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ext2: add missing brelse() in ext2_new_inode()
  2019-05-30 10:10 [PATCH] ext2: add missing brelse() in ext2_new_inode() Chengguang Xu
@ 2019-05-30 11:35 ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2019-05-30 11:35 UTC (permalink / raw)
  To: Chengguang Xu; +Cc: jack, linux-ext4

On Thu 30-05-19 18:10:42, Chengguang Xu wrote:
> There is a missing brelse of bitmap_bh in an error
> path of ext2_new_inode().
> 
> Signed-off-by: Chengguang Xu <cgxu519@zoho.com.cn>

Thanks for the fix! Applied.

								Honza
> ---
>  fs/ext2/ialloc.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c
> index 334dea4e499d..fda7d3f5b4be 100644
> --- a/fs/ext2/ialloc.c
> +++ b/fs/ext2/ialloc.c
> @@ -509,6 +509,7 @@ struct inode *ext2_new_inode(struct inode *dir, umode_t mode,
>  	/*
>  	 * Scanned all blockgroups.
>  	 */
> +	brelse(bitmap_bh);
>  	err = -ENOSPC;
>  	goto fail;
>  got:
> -- 
> 2.20.1
> 
> 
> 
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-30 11:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-30 10:10 [PATCH] ext2: add missing brelse() in ext2_new_inode() Chengguang Xu
2019-05-30 11:35 ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).