mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
hw/9pfs: Use the correct file descriptor in Fsdriver Callback
Fsdriver callback that operate on file descriptor need to differentiate between directory fd and file fd. Based on the original patch from Sassan Panahinejad <sassan@sassan.me.uk> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
This commit is contained in:
parent
8798d6c98e
commit
8b88827222
5 changed files with 57 additions and 24 deletions
|
@ -71,7 +71,7 @@ int v9fs_co_fstat(V9fsPDU *pdu, V9fsFidState *fidp, struct stat *stbuf)
|
|||
}
|
||||
v9fs_co_run_in_worker(
|
||||
{
|
||||
err = s->ops->fstat(&s->ctx, &fidp->fs, stbuf);
|
||||
err = s->ops->fstat(&s->ctx, fidp->fid_type, &fidp->fs, stbuf);
|
||||
if (err < 0) {
|
||||
err = -errno;
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ int v9fs_co_fsync(V9fsPDU *pdu, V9fsFidState *fidp, int datasync)
|
|||
}
|
||||
v9fs_co_run_in_worker(
|
||||
{
|
||||
err = s->ops->fsync(&s->ctx, &fidp->fs, datasync);
|
||||
err = s->ops->fsync(&s->ctx, fidp->fid_type, &fidp->fs, datasync);
|
||||
if (err < 0) {
|
||||
err = -errno;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue