diff --git a/fs/ntfs3/index.c b/fs/ntfs3/index.c index 97f06c26fe1a..16479b6ce845 100644 --- a/fs/ntfs3/index.c +++ b/fs/ntfs3/index.c @@ -1711,7 +1711,7 @@ static int indx_insert_into_root(struct ntfs_index *indx, struct ntfs_inode *ni, /* Bug? */ ntfs_set_state(sbi, NTFS_DIRTY_ERROR); err = -EINVAL; - goto out_free_re; + goto out_free_alloc; } if (err) { @@ -1722,7 +1722,7 @@ static int indx_insert_into_root(struct ntfs_index *indx, struct ntfs_inode *ni, /* Bug? */ ntfs_set_state(sbi, NTFS_DIRTY_ERROR); } - goto out_free_re; + goto out_free_alloc; } e = (struct NTFS_DE *)(root + 1); @@ -1733,7 +1733,7 @@ static int indx_insert_into_root(struct ntfs_index *indx, struct ntfs_inode *ni, n = indx_new(indx, ni, new_vbn, sub_vbn); if (IS_ERR(n)) { err = PTR_ERR(n); - goto out_free_re; + goto out_free_alloc; } hdr = &n->index->ihdr; @@ -1781,6 +1781,8 @@ static int indx_insert_into_root(struct ntfs_index *indx, struct ntfs_inode *ni, out_put_n: put_indx_node(n); +out_free_alloc: + run_close(&indx->alloc_run); out_free_re: kfree(re); out_free_root: