diff options
Diffstat (limited to 'api/src/glfs-handleops.c')
-rw-r--r-- | api/src/glfs-handleops.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/api/src/glfs-handleops.c b/api/src/glfs-handleops.c index 6a60557ff..14d6c1b2c 100644 --- a/api/src/glfs-handleops.c +++ b/api/src/glfs-handleops.c @@ -152,6 +152,7 @@ glfs_h_stat (struct glfs *fs, struct glfs_object *object, struct stat *stat) /* fop/op */ ret = syncop_stat (subvol, &loc, &iatt); + DECODE_SYNCOP_ERR (ret); /* populate out args */ if (!ret && stat) { @@ -258,6 +259,7 @@ glfs_h_setattrs (struct glfs *fs, struct glfs_object *object, struct stat *stat, /* fop/op */ ret = syncop_setattr (subvol, &loc, &iatt, glvalid, 0, 0); + DECODE_SYNCOP_ERR (ret); out: loc_wipe (&loc); @@ -331,6 +333,7 @@ glfs_h_open_with_xdata (struct glfs *fs, struct glfs_object *object, int flags, /* fop/op */ ret = syncop_open_with_xdata (subvol, &loc, flags, glfd->fd, dict); + DECODE_SYNCOP_ERR (ret); out: loc_wipe (&loc); @@ -417,6 +420,7 @@ glfs_h_creat_with_xdata (struct glfs *fs, struct glfs_object *parent, const char /* fop/op */ ret = syncop_create (subvol, &loc, flags, mode, glfd->fd, xattr_req, &iatt); + DECODE_SYNCOP_ERR (ret); /* populate out args */ if (ret == 0) { @@ -521,6 +525,7 @@ glfs_h_mkdir_with_xdata (struct glfs *fs, struct glfs_object *parent, const char /* fop/op */ ret = syncop_mkdir (subvol, &loc, mode, xattr_req, &iatt); + DECODE_SYNCOP_ERR (ret); /* populate out args */ if ( ret == 0 ) { @@ -617,6 +622,7 @@ glfs_h_mknod_with_xdata (struct glfs *fs, struct glfs_object *parent, const char /* fop/op */ ret = syncop_mknod (subvol, &loc, mode, dev, xattr_req, &iatt); + DECODE_SYNCOP_ERR (ret); /* populate out args */ if (ret == 0) { @@ -705,11 +711,13 @@ glfs_h_unlink_with_xdata (struct glfs *fs, struct glfs_object *parent, const cha if (!IA_ISDIR(loc.inode->ia_type)) { ret = syncop_unlink_with_xdata (subvol, &loc, dict); + DECODE_SYNCOP_ERR (ret); if (ret != 0) { goto out; } } else { ret = syncop_rmdir_with_xdata (subvol, &loc, 0, dict); + DECODE_SYNCOP_ERR (ret); if (ret != 0) { goto out; } @@ -790,6 +798,7 @@ glfs_h_opendir_with_xdata (struct glfs *fs, struct glfs_object *object, dict_t * /* fop/op */ ret = syncop_opendir_with_xdata (subvol, &loc, glfd->fd, dict); + DECODE_SYNCOP_ERR (ret); out: loc_wipe (&loc); @@ -887,6 +896,7 @@ glfs_h_create_from_handle (struct glfs *fs, unsigned char *handle, int len, } ret = syncop_lookup (subvol, &loc, 0, &iatt, 0, 0); + DECODE_SYNCOP_ERR (ret); if (ret) { gf_log (subvol->name, GF_LOG_WARNING, "inode refresh of %s failed: %s", @@ -975,6 +985,7 @@ glfs_h_truncate (struct glfs *fs, struct glfs_object *object, off_t offset) /* fop/op */ ret = syncop_truncate (subvol, &loc, (off_t)offset); + DECODE_SYNCOP_ERR (ret); /* populate out args */ if (ret == 0) @@ -1037,6 +1048,7 @@ glfs_h_symlink_with_xdata (struct glfs *fs, struct glfs_object *parent, const ch /* fop/op */ ret = syncop_symlink (subvol, &loc, data, xattr_req, &iatt); + DECODE_SYNCOP_ERR (ret); /* populate out args */ if (ret == 0) { @@ -1129,6 +1141,7 @@ glfs_h_readlink (struct glfs *fs, struct glfs_object *object, char *buf, /* fop/op */ ret = syncop_readlink (subvol, &loc, &linkval, bufsiz); + DECODE_SYNCOP_ERR (ret); /* populate out args */ if (ret > 0) @@ -1214,6 +1227,7 @@ glfs_h_link_with_xdata (struct glfs *fs, struct glfs_object *linksrc, /* fop/op */ ret = syncop_link_with_xdata (subvol, &oldloc, &newloc, dict); + DECODE_SYNCOP_ERR (ret); if (ret == 0) /* TODO: No iatt to pass as there has been no lookup */ @@ -1310,6 +1324,7 @@ glfs_h_rename_with_xdata (struct glfs *fs, struct glfs_object *olddir, const cha /* TODO: check if new or old is a prefix of the other, and fail EINVAL */ ret = syncop_rename_with_xdata (subvol, &oldloc, &newloc, dict); + DECODE_SYNCOP_ERR (ret); if (ret == 0) inode_rename (oldloc.parent->table, oldloc.parent, oldloc.name, |