[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH-V2 03/24] virtio-9p: Return correct error from v9fs_
From: |
Venkateswararao Jujjuri (JV) |
Subject: |
[Qemu-devel] [PATCH-V2 03/24] virtio-9p: Return correct error from v9fs_remove |
Date: |
Wed, 21 Jul 2010 09:04:38 -0700 |
From: Sripathi Kodi <address@hidden>
Signed-off-by: Sripathi Kodi <address@hidden>
In v9fs_remove_post_remove() we currently ignore the error returned by
the previous call to remove() and return an error only if freeing the
fid fails. However, the client expects to see the error from remove().
Currently the client falsely thinks that the remove call has always
succeeded. For example, doing rmdir on a non-empty directory does
not return ENOTEMPTY.
With this patch we ignore the error from free_fid(). The client cannot
use this error value anyway.
Signed-off-by: Sripathi Kodi <address@hidden>
Signed-off-by: Venkateswararao Jujjuri <address@hidden>
---
hw/virtio-9p.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/hw/virtio-9p.c b/hw/virtio-9p.c
index 20560e5..0540a74 100644
--- a/hw/virtio-9p.c
+++ b/hw/virtio-9p.c
@@ -1877,14 +1877,15 @@ static void v9fs_flush(V9fsState *s, V9fsPDU *pdu)
static void v9fs_remove_post_remove(V9fsState *s, V9fsRemoveState *vs,
int err)
{
- /* For TREMOVE we need to clunk the fid even on failed remove */
- err = free_fid(s, vs->fidp->fid);
if (err < 0) {
- goto out;
+ err = -errno;
+ } else {
+ err = vs->offset;
}
- err = vs->offset;
-out:
+ /* For TREMOVE we need to clunk the fid even on failed remove */
+ free_fid(s, vs->fidp->fid);
+
complete_pdu(s, vs->pdu, err);
qemu_free(vs);
}
--
1.6.5.2
- [Qemu-devel] [PATCH-V2 00/24] Consolidated VirtFS work, Venkateswararao Jujjuri (JV), 2010/07/21
- [Qemu-devel] [PATCH-V2 02/24] qemu: virtio-9p: Implement statfs support in server, Venkateswararao Jujjuri (JV), 2010/07/21
- [Qemu-devel] [PATCH-V2 01/24] qemu: virtio-9p: Recognize 9P2000.L protocol, Venkateswararao Jujjuri (JV), 2010/07/21
- [Qemu-devel] [PATCH-V2 11/24] [virtio-9p] Define and implement TSYMLINK for 9P2000.L, Venkateswararao Jujjuri (JV), 2010/07/21
- [Qemu-devel] [PATCH-V2 10/24] [virtio-9p] Implement TLINK for 9P2000.L, Venkateswararao Jujjuri (JV), 2010/07/21
- [Qemu-devel] [PATCH-V2 19/24] virtio-9p: Implement TXATTRCREATE, Venkateswararao Jujjuri (JV), 2010/07/21
- [Qemu-devel] [PATCH-V2 18/24] virtio-9p: Implement TXATTRWALK, Venkateswararao Jujjuri (JV), 2010/07/21
- [Qemu-devel] [PATCH-V2 03/24] virtio-9p: Return correct error from v9fs_remove,
Venkateswararao Jujjuri (JV) <=
- [Qemu-devel] [PATCH-V2 06/24] virtio-9p: getattr server implementation for 9P2000.L protocol., Venkateswararao Jujjuri (JV), 2010/07/21
- [Qemu-devel] [PATCH-V2 17/24] virtio-9p: Add fidtype so that we can do type specific operation, Venkateswararao Jujjuri (JV), 2010/07/21
- [Qemu-devel] [PATCH-V2 08/24] [virtio-9p] Make v9fs_do_utimensat accept timespec structures instead of v9stat., Venkateswararao Jujjuri (JV), 2010/07/21
- [Qemu-devel] [PATCH-V2 16/24] qemu: virtio-9p: Implement LOPEN, Venkateswararao Jujjuri (JV), 2010/07/21
- [Qemu-devel] [PATCH-V2 09/24] virtio-9p: Implement server side of setattr for 9P2000.L protocol., Venkateswararao Jujjuri (JV), 2010/07/21
- [Qemu-devel] [PATCH-V2 24/24] virtio-9p: Fix formatting issues in v9fs_wstat_post_chown(), Venkateswararao Jujjuri (JV), 2010/07/21
- [Qemu-devel] [PATCH-V2 23/24] virtio-9p: Fix the memset usage, Venkateswararao Jujjuri (JV), 2010/07/21
- [Qemu-devel] [PATCH-V2 21/24] virtio-9p: Add SM_NONE security model, Venkateswararao Jujjuri (JV), 2010/07/21
- [Qemu-devel] [PATCH-V2 13/24] qemu: virtio-9p: Implement TMKNOD, Venkateswararao Jujjuri (JV), 2010/07/21
- [Qemu-devel] [PATCH-V2 20/24] virtio-9p: Hide user.virtfs xattr in case of mapped security., Venkateswararao Jujjuri (JV), 2010/07/21