ext4: fix potential race when freeing ext4_io_page structures

Use an atomic_t and make sure we don't free the structure while we
might still be submitting I/O for that page.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
Theodore Ts'o
2010-11-08 13:45:33 -05:00
parent f7ad6d2e92
commit 83668e7141
2 changed files with 16 additions and 24 deletions

View File

@@ -177,7 +177,7 @@ struct mpage_da_data {
struct ext4_io_page {
struct page *p_page;
int p_count;
atomic_t p_count;
};
#define MAX_IO_PAGES 128