From 790db7efdbe1536acf1c4f4f95a0316dbda59433 Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Thu, 29 Jun 2017 15:11:50 +0200 Subject: 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 Signed-off-by: Greg Kurz --- hw/9pfs/9p-local.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/9pfs') diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c index 1e78b7c..83952ef 100644 --- a/hw/9pfs/9p-local.c +++ b/hw/9pfs/9p-local.c @@ -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; } -- cgit v1.1