9pfs: local: remove: use correct path component

Commit a0e640a8 introduced a path processing error.
Pass fstatat the dirpath based path component instead
of the entire path.

Signed-off-by: Bruce Rogers <brogers@suse.com>
Signed-off-by: Greg Kurz <groug@kaod.org>
This commit is contained in:
Bruce Rogers 2017-06-29 15:11:50 +02:00 committed by Greg Kurz
parent 4645886754
commit 790db7efdb

View File

@ -1100,7 +1100,7 @@ static int local_remove(FsContext *ctx, const char *path)
goto out;
}
if (fstatat(dirfd, path, &stbuf, AT_SYMLINK_NOFOLLOW) < 0) {
if (fstatat(dirfd, name, &stbuf, AT_SYMLINK_NOFOLLOW) < 0) {
goto err_out;
}