• Andrew Morton's avatar
    [PATCH] hold i_sem on swapfiles · e5be69be
    Andrew Morton authored
    If a swapfile is ftruncated while in use, subsequent swapout will scribble on
    the filesystem.
    
    This is a case of root-shoot-foot, but wrecking the fs is a fairly rude
    response.  And it's easy to fix: hold i_sem across the life of the swapon.
    e5be69be
swapfile.c 38.5 KB