浏览代码

ext4: fix possible inode leak in the retry loop of ext4_resize_fs()

Fixes: 1c6bd7173d66 ("ext4: convert file system to meta_bg if needed ...")
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org # 3.7
Vasily Averin 6 年之前
父节点
当前提交
db6aee6240
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      fs/ext4/resize.c

+ 4 - 0
fs/ext4/resize.c

@@ -2058,6 +2058,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;
 	}