Each inode contains a count of the number of directory entries linked to it. The fsck command verifies the link count of each inode by examining the entire directory structure, starting from the root (/) directory, and calculating an actual link count for each inode.
Discrepancies between the link count stored in the inode and the actual link count as determined by the fsck command might be one of three types:
The stored count is not 0, and the actual count is 0.
This condition can occur if no directory entry exists for the inode. In this case, the fsck command puts the disconnected file in the lost+found directory.
The stored count is not 0 and the actual count is not 0. However, the counts are unequal.
This condition can occur if a directory entry has been added or removed, but the inode has not been updated. In this case, the fsck command replaces the stored link count with the actual link count.
The stored count is 0, and the actual count is not 0.
In this case, the fsck command changes the link count of the inode to the actual count.