• Kevin Wolf's avatar
    ext2: Handle duplicate dir entries gracefully in unlink · 9e37f5e2
    Kevin Wolf authored
    
    
    It shouldn't normally happen that there are two directory entries with
    the same name, but in order to avoid crashes on inconsistent file
    systems, let's make sure to free the right resource instead of just one
    with the same name.
    
    Also, remove only one directory entry so that another unlink() request
    can succeed and fully remove the second entry.
    Signed-off-by: Kevin Wolf's avatarKevin Wolf <kevin@tyndur.org>
    9e37f5e2
directory.c 9.44 KB