]> git.proxmox.com Git - mirror_qemu.git/commitdiff
9pfs: local: remove: use correct path component
authorBruce Rogers <brogers@suse.com>
Thu, 29 Jun 2017 13:11:50 +0000 (15:11 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 24 Aug 2017 21:58:51 +0000 (16:58 -0500)
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>
(cherry picked from commit 790db7efdbe1536acf1c4f4f95a0316dbda59433)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/9pfs/9p-local.c

index 7a0c383e7e8fdd26844ac8ebff6490267b849278..b13ff2120e7f9acb1c147ba5216632aa9430072d 100644 (file)
@@ -1009,7 +1009,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;
     }