tools/kvm/9p: WSTAT don't use open fid
PATCH 1/1 tools/kvm/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 <[email protected]>
--- tools/kvm/virtio/9p.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
tools/kvm/virtio/9p.c +1 -1
@@ -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; }
Signature · 1 line
1.7.4.1