• A
    ovl: cleanup orphan index entries · caf70cb2
    Amir Goldstein 提交于
    index entry should live only as long as there are upper or lower
    hardlinks.
    
    Cleanup orphan index entries on mount and when dropping the last
    overlay inode nlink.
    
    When about to cleanup or link up to orphan index and the index inode
    nlink > 1, admit that something went wrong and adjust overlay nlink
    to index inode nlink - 1 to prevent it from dropping below zero.
    This could happen when adding lower hardlinks underneath a mounted
    overlay and then trying to unlink them.
    Signed-off-by: NAmir Goldstein <amir73il@gmail.com>
    Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
    caf70cb2
super.c 28.7 KB