linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext2: add missing brelse() in ext2_iget()
@ 2019-06-16 15:08 Chengguang Xu
  2019-06-16 16:45 ` Darrick J. Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Chengguang Xu @ 2019-06-16 15:08 UTC (permalink / raw)
  To: jack; +Cc: linux-ext4, Chengguang Xu

Add missing brelse() on error path of ext2_iget().

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

diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
index e474127dd255..fb3611f02051 100644
--- a/fs/ext2/inode.c
+++ b/fs/ext2/inode.c
@@ -1473,6 +1473,7 @@ struct inode *ext2_iget (struct super_block *sb, unsigned long ino)
 	else
 		ei->i_dir_acl = le32_to_cpu(raw_inode->i_dir_acl);
 	if (i_size_read(inode) < 0) {
+		brelse(bh);
 		ret = -EFSCORRUPTED;
 		goto bad_inode;
 	}
-- 
2.21.0




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

end of thread, other threads:[~2019-06-19 16:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-16 15:08 [PATCH] ext2: add missing brelse() in ext2_iget() Chengguang Xu
2019-06-16 16:45 ` Darrick J. Wong
2019-06-19 16:45   ` 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).