Merge tag 'block-5.15-2021-09-05' of git://git.kernel.dk/linux-block
[linux-2.6-microblaze.git] / lib / sg_pool.c
index db29e5c..a0b1a52 100644 (file)
@@ -90,7 +90,8 @@ void sg_free_table_chained(struct sg_table *table,
        if (nents_first_chunk == 1)
                nents_first_chunk = 0;
 
-       __sg_free_table(table, SG_CHUNK_SIZE, nents_first_chunk, sg_pool_free);
+       __sg_free_table(table, SG_CHUNK_SIZE, nents_first_chunk, sg_pool_free,
+                       table->orig_nents);
 }
 EXPORT_SYMBOL_GPL(sg_free_table_chained);