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:
@@ -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
|
||||
|
Reference in New Issue
Block a user