summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/src/glfs-fops.c4
-rw-r--r--api/src/glfs-handleops.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c
index bc9c758a9c9..a5ab8e43961 100644
--- a/api/src/glfs-fops.c
+++ b/api/src/glfs-fops.c
@@ -124,6 +124,7 @@ retry:
errno = ENOMEM;
goto out;
}
+ glfd->fd->flags = flags;
ret = syncop_open (subvol, &loc, flags, glfd->fd);
DECODE_SYNCOP_ERR (ret);
@@ -136,7 +137,6 @@ out:
glfs_fd_destroy (glfd);
glfd = NULL;
} else if (glfd) {
- glfd->fd->flags = flags;
fd_bind (glfd->fd);
glfs_fd_bind (glfd);
}
@@ -394,6 +394,7 @@ retry:
errno = ENOMEM;
goto out;
}
+ glfd->fd->flags = flags;
if (ret == 0) {
ret = syncop_open (subvol, &loc, flags, glfd->fd);
@@ -418,7 +419,6 @@ out:
glfs_fd_destroy (glfd);
glfd = NULL;
} else if (glfd) {
- glfd->fd->flags = flags;
fd_bind (glfd->fd);
glfs_fd_bind (glfd);
}
diff --git a/api/src/glfs-handleops.c b/api/src/glfs-handleops.c
index ba468382077..0188128f712 100644
--- a/api/src/glfs-handleops.c
+++ b/api/src/glfs-handleops.c
@@ -500,6 +500,7 @@ glfs_h_open (struct glfs *fs, struct glfs_object *object, int flags)
errno = ENOMEM;
goto out;
}
+ glfd->fd->flags = flags;
/* populate loc */
GLFS_LOC_FILL_INODE (inode, loc, out);
@@ -518,7 +519,6 @@ out:
glfs_fd_destroy (glfd);
glfd = NULL;
} else {
- glfd->fd->flags = flags;
fd_bind (glfd->fd);
glfs_fd_bind (glfd);
}
@@ -592,6 +592,7 @@ glfs_h_creat (struct glfs *fs, struct glfs_object *parent, const char *path,
errno = ENOMEM;
goto out;
}
+ glfd->fd->flags = flags;
/* fop/op */
ret = syncop_create (subvol, &loc, flags, mode, glfd->fd,