aboutsummaryrefslogtreecommitdiffstats
path: root/hw/9pfs/cofile.c
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2011-12-04 22:35:28 +0530
committerAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2011-12-04 22:35:28 +0530
commit8b8882722210334f19b41950c82c529e33f97b00 (patch)
tree553a6204f98a7a8d27757e061167ead3ffb5a9c2 /hw/9pfs/cofile.c
parent8798d6c98ea32bde6cebf7652730c3273ce38fd4 (diff)
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>
Diffstat (limited to 'hw/9pfs/cofile.c')
-rw-r--r--hw/9pfs/cofile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/9pfs/cofile.c b/hw/9pfs/cofile.c
index 586b0382f..b15838c1e 100644
--- a/hw/9pfs/cofile.c
+++ b/hw/9pfs/cofile.c
@@ -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;
}