No, I confirmed this has nothing to do with it by modifying your program (this is Ubuntu 18.04):
$ test-tmp-linkat ~/snap/test-tmp-linkat/common/
prefix: /home/jamie/snap/test-tmp-linkat/common/
opened fd: 3 [/proc/self/fd/3]
writing works
linkat failed: No such file or directory
From journalctl:
May 18 12:22:05 localhost audit[7010]: AVC apparmor="DENIED" operation="link" info="Failed name lookup - deleted entry" error=-2 profile="snap.test-tmp-linkat.test-tmp-linkat" name="/home/jamie/snap/test-tmp-linkat/common/#12871268" pid=7010 comm="tmp-linkat" requested_mask="l" denied_mask="l" fsuid=1000 ouid=1000
May 18 12:22:05 localhost audit[7010]: AVC apparmor="DENIED" operation="link" profile="snap.test-tmp-linkat.test-tmp-linkat" name="/home/jamie/snap/test-tmp-linkat/common/okular_DHqFKd.ps" pid=7010 comm="tmp-linkat" requested_mask="l" denied_mask="l" fsuid=1000 ouid=1000 target="/home/jamie/snap/test-tmp-linkat/common/#12871268"
May 18 12:22:05 localhost kernel: audit: type=1400 audit(1526664125.788:107321): apparmor="DENIED" operation="link" info="Failed name lookup - deleted entry" error=-2 profile="snap.test-tmp-linkat.test-tmp-linkat" name="/home/jamie/snap/test-tmp-linkat/common/#12871268" pid=7010 comm="tmp-linkat" requested_mask="l" denied_mask="l" fsuid=1000 ouid=1000
May 18 12:22:05 localhost kernel: audit: type=1400 audit(1526664125.788:107322): apparmor="DENIED" operation="link" profile="snap.test-tmp-linkat.test-tmp-linkat" name="/home/jamie/snap/test-tmp-linkat/common/okular_DHqFKd.ps" pid=7010 comm="tmp-linkat" requested_mask="l" denied_mask="l" fsuid=1000 ouid=1000 target="/home/jamie/snap/test-tmp-linkat/common/#12871268"