diff options
Diffstat (limited to 'hw/9pfs/9p.c')
| -rw-r--r-- | hw/9pfs/9p.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index c96f2d2d3d..b22df3aa2b 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -1727,7 +1727,11 @@ static void coroutine_fn v9fs_setattr(void *opaque) } else { times[1].tv_nsec = UTIME_OMIT; } - err = v9fs_co_utimensat(pdu, &fidp->path, times); + if (fid_has_valid_file_handle(pdu->s, fidp)) { + err = v9fs_co_futimens(pdu, fidp, times); + } else { + err = v9fs_co_utimensat(pdu, &fidp->path, times); + } if (err < 0) { goto out; } |