virtiofsd: remove symlink fallbacks
commit93bb3d8d4cdadf90f714b8ab71b4caa16092f38c
authorMiklos Szeredi <mszeredi@redhat.com>
Thu, 14 May 2020 14:07:36 +0000 (14 16:07 +0200)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Mon, 1 Jun 2020 17:44:27 +0000 (1 18:44 +0100)
treea08cf112174941e4cc8f9868135e3bb3cfc45fdb
parent7d2ef6dcc1cf87e7506487051eda010b479f5d0e
virtiofsd: remove symlink fallbacks

Path lookup in the kernel has special rules for looking up magic symlinks
under /proc.  If a filesystem operation is instructed to follow symlinks
(e.g. via AT_SYMLINK_FOLLOW or lack of AT_SYMLINK_NOFOLLOW), and the final
component is such a proc symlink, then the target of the magic symlink is
used for the operation, even if the target itself is a symlink.  I.e. path
lookup is always terminated after following a final magic symlink.

I was erronously assuming that in the above case the target symlink would
also be followed, and so workarounds were added for a couple of operations
to handle the symlink case.  Since the symlink can be handled simply by
following the proc symlink, these workardouds are not needed.

Also remove the "norace" option, which disabled the workarounds.

Commit bdfd66788349 ("virtiofsd: Fix xattr operations") already dealt with
the same issue for xattr operations.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Message-Id: <20200514140736.20561-1-mszeredi@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
tools/virtiofsd/passthrough_ll.c