From: Vasily Averin Date: Tue, 6 Nov 2018 21:20:40 +0000 (-0500) Subject: ext4: fix possible inode leak in the retry loop of ext4_resize_fs() X-Git-Tag: v3.18.126~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f817fb9e4475a27460fea2e04971e557bdbd85a4;p=profile%2Fwearable%2Fplatform%2Fkernel%2Flinux-3.18-exynos7270.git ext4: fix possible inode leak in the retry loop of ext4_resize_fs() commit db6aee62406d9fbb53315fcddd81f1dc271d49fa upstream. Fixes: 1c6bd7173d66 ("ext4: convert file system to meta_bg if needed ...") Signed-off-by: Vasily Averin Signed-off-by: Theodore Ts'o Cc: stable@kernel.org # 3.7 Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index e24ea16..a6e6e39 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c @@ -2028,6 +2028,10 @@ retry: n_blocks_count_retry = 0; free_flex_gd(flex_gd); flex_gd = NULL; + if (resize_inode) { + iput(resize_inode); + resize_inode = NULL; + } goto retry; }