Hard links can be identified by comparing both the inode number and the device number (two different mounted file systems may each have a file with the same inode number, but they will have different device numbers). You can read the device/inode manually with stat $file, or find can do it for you with -samefile. You can make searching for hard links more efficient by searching only within the same device:
find $fsroot/. -mount -samefile $myfile
Soft links are harder as they can be located anywhere. You need to dereference them to identify the inode/device. You can do this manually with stat -L or automatically with find -L:
find -L / -samefile $myfile
Note that this will also find hard links. I don't think find has an easy way to search for only soft links that point to a specific inode.
It might be that some file-systems can tell you this information more efficiently, but I think the in the general case you need to scan every file.
findhas the-samefileoption, butfind /is hardly efficient as it has to basically traverse the entire filesystem. – jw013 May 3 '12 at 11:06