• Hugh Dickins's avatar
    [PATCH] shmem truncate race fix · 91abc449
    Hugh Dickins authored
    The earlier partial truncation fix in shmem_truncate admits it is racy,
    and I've now seen that (though perhaps more likely when
    mpage_writepages was writing pages it shouldn't).  A cleaner fix is,
    not to repeat the memclear in shmem_truncate, but to hold the partial
    page in memory throughout truncation, by shmem_holdpage from
    shmem_notify_change.
    91abc449
shmem.c 42.1 KB