diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2011-05-07 21:09:24 +0530 |
---|---|---|
committer | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2011-08-22 09:44:13 +0530 |
commit | bed4352c4f041af65c522cb453aff468f49aebea (patch) | |
tree | 86bce64205f8feb6227cee10204a713188c84b26 /hw/9pfs/cofile.c | |
parent | 3cc19c0c607ca780c79dbf42b4781d110a64e342 (diff) |
hw/9pfs: Add yeild support for clunk related coroutine
This include lsetxattr, lremovexattr, closedir and close.
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.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/hw/9pfs/cofile.c b/hw/9pfs/cofile.c index 4b0d96c703..e552999666 100644 --- a/hw/9pfs/cofile.c +++ b/hw/9pfs/cofile.c @@ -81,3 +81,19 @@ int v9fs_co_open2(V9fsState *s, V9fsFidState *fidp, char *fullname, gid_t gid, }); return err; } + +int v9fs_co_close(V9fsState *s, V9fsFidState *fidp) +{ + int fd; + int err; + + fd = fidp->fs.fd; + v9fs_co_run_in_worker( + { + err = s->ops->close(&s->ctx, fd); + if (err < 0) { + err = -errno; + } + }); + return err; +} |