Commit-ID: ab747db93736c6e784d4422e88ac76525f393dee Gitweb: http://git.kernel.org/tip/ab747db93736c6e784d4422e88ac76525f393dee Author: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxxxxxxx> AuthorDate: Sun, 10 Jul 2011 23:53:21 +0530 Committer: Pekka Enberg <penberg@xxxxxxxxxx> CommitDate: Sun, 10 Jul 2011 21:41:44 +0300 kvm tools, 9p: WSTAT don't use open fid We should use full path instead of fd. WSTAT can operate on unopen fid. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxxxxxxx> Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx> --- tools/kvm/virtio/9p.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/kvm/virtio/9p.c b/tools/kvm/virtio/9p.c index e7e108b..c6f49da 100644 --- a/tools/kvm/virtio/9p.c +++ b/tools/kvm/virtio/9p.c @@ -506,7 +506,7 @@ static void virtio_p9_wstat(struct p9_dev *p9dev, fid = &p9dev->fids[fid_val]; if (wstat.length != -1UL) { - res = ftruncate(fid->fd, wstat.length); + res = truncate(fid->abs_path, wstat.length); if (res < 0) goto err_out; } -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html