summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Pierre André <jpandre@users.sourceforge.net>2012-08-22 10:00:22 +0200
committerJean-Pierre André <jpandre@users.sourceforge.net>2012-08-22 10:00:22 +0200
commit1f07ae9b6030a14ff3426274b272f7142ce41ead (patch)
tree58f95fee6f511912f7b47a81d4b1fb814c399d0f
parent5a87bb24c96c77ef97004ac016db45e8aebfe7da (diff)
downloadillumos-fusefs-1f07ae9b6030a14ff3426274b272f7142ce41ead.tar.gz
Processed the error returned by the file system on rename()
-rw-r--r--kernel/fuse_vnops.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/fuse_vnops.c b/kernel/fuse_vnops.c
index 47bf031..da838d7 100644
--- a/kernel/fuse_vnops.c
+++ b/kernel/fuse_vnops.c
@@ -2746,6 +2746,14 @@ fuse_rename_i(struct vnode *sdvp, char *oldname, struct vnode *tdvp,
(void) memcpy(strptr, newname, new_namelen);
err = fuse_queue_request_wait(sep, msgp);
+ if (!err) {
+ /* Check for any error from fuse library */
+ if ((err = msgp->opdata.fouth->error) != 0) {
+ DTRACE_PROBE2(fuse_rename_err,
+ char *, "FUSE_RENAME request failed",
+ struct fuse_out_header *, msgp->opdata.fouth);
+ }
+ }
fuse_free_msg(msgp);
return (err);
}