summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
Diffstat (limited to 'api')
-rw-r--r--api/src/glfs-fops.c30
-rw-r--r--api/src/glfs.c6
2 files changed, 15 insertions, 21 deletions
diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c
index be1077a2760..ec2fbb2c264 100644
--- a/api/src/glfs-fops.c
+++ b/api/src/glfs-fops.c
@@ -869,10 +869,9 @@ pub_glfs_preadv_async (struct glfs_fd *glfd, const struct iovec *iovec,
offset, flags, NULL);
out:
- if (fd)
- fd_unref (fd);
-
if (ret) {
+ if (fd)
+ fd_unref (fd);
if (glfd)
GF_REF_PUT (glfd);
if (gio) {
@@ -1187,10 +1186,9 @@ pub_glfs_pwritev_async (struct glfs_fd *glfd, const struct iovec *iovec,
ret = 0;
out:
- if (fd)
- fd_unref (fd);
-
if (ret) {
+ if (fd)
+ fd_unref (fd);
if (glfd)
GF_REF_PUT (glfd);
GF_FREE (gio);
@@ -1374,10 +1372,9 @@ glfs_fsync_async_common (struct glfs_fd *glfd, glfs_io_cbk fn, void *data,
subvol->fops->fsync, fd, dataonly, NULL);
out:
- if (fd)
- fd_unref (fd);
-
if (ret) {
+ if (fd)
+ fd_unref (fd);
if (glfd)
GF_REF_PUT (glfd);
GF_FREE (gio);
@@ -1628,10 +1625,9 @@ pub_glfs_ftruncate_async (struct glfs_fd *glfd, off_t offset, glfs_io_cbk fn,
ret = 0;
out:
- if (fd)
- fd_unref (fd);
-
if (ret) {
+ if (fd)
+ fd_unref (fd);
if (glfd)
GF_REF_PUT (glfd);
GF_FREE (gio);
@@ -2487,10 +2483,9 @@ pub_glfs_discard_async (struct glfs_fd *glfd, off_t offset, size_t len,
ret = 0;
out:
- if (fd)
- fd_unref (fd);
-
if (ret) {
+ if (fd)
+ fd_unref (fd);
if (glfd)
GF_REF_PUT (glfd);
GF_FREE (gio);
@@ -2575,10 +2570,9 @@ pub_glfs_zerofill_async (struct glfs_fd *glfd, off_t offset, off_t len,
subvol->fops->zerofill, fd, offset, len, NULL);
ret = 0;
out:
- if (fd)
- fd_unref (fd);
-
if (ret) {
+ if (fd)
+ fd_unref (fd);
if (glfd)
GF_REF_PUT (glfd);
GF_FREE (gio);
diff --git a/api/src/glfs.c b/api/src/glfs.c
index 096e6aec2cf..9a92fa97c3d 100644
--- a/api/src/glfs.c
+++ b/api/src/glfs.c
@@ -1370,18 +1370,18 @@ pub_glfs_upcall_inode_get_pstat (struct glfs_upcall_inode *arg)
{
return &arg->p_buf;
}
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_get_pstat, 3.7.16);
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_inode_get_pstat, 3.7.16);
struct glfs_object*
pub_glfs_upcall_inode_get_oldpobject (struct glfs_upcall_inode *arg)
{
return arg->oldp_object;
}
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_get_oldpobject, 3.7.16);
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_inode_get_oldpobject, 3.7.16);
struct stat*
pub_glfs_upcall_inode_get_oldpstat (struct glfs_upcall_inode *arg)
{
return &arg->oldp_buf;
}
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_get_oldpstat, 3.7.16);
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_inode_get_oldpstat, 3.7.16);