• Andrew Morton's avatar
    [PATCH] Fix race between umount and inode pruning · 69ce2cbd
    Andrew Morton authored
    Patch from Hugh Dickins <hugh@veritas.com>
    
    When prune_icache coincides with unmounting, invalidate_inodes notices
    the inode it's working on as busy but doesn't wait: Self-destruct in 5
    seconds message, and later iput oopses on freed super_block.
    
    Neither end is a fast path, so the patch just adds iprune_sem for exclusion.
    
    The semaphore is held across dispose_list so that
    dispose_list->clear_inode->destroy_inode cannot reference a destroyed
    superblock.
    69ce2cbd
inode.c 33.2 KB