summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/storage/posix/src/posix.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index 066d8307190..f078c551baf 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -1158,14 +1158,6 @@ real_op:
entry_created = _gf_true;
- op_ret = posix_gfid_set (this, real_path, loc, xdata);
- if (op_ret) {
- gf_log (this->name, GF_LOG_ERROR,
- "setting gfid on %s failed", real_path);
- } else {
- gfid_set = _gf_true;
- }
-
#ifndef HAVE_SET_FSID
op_ret = lchown (real_path, frame->root->uid, gid);
if (op_ret == -1) {
@@ -1202,6 +1194,14 @@ ignore:
strerror (errno));
}
+ op_ret = posix_gfid_set (this, real_path, loc, xdata);
+ if (op_ret) {
+ gf_log (this->name, GF_LOG_ERROR,
+ "setting gfid on %s failed", real_path);
+ } else {
+ gfid_set = _gf_true;
+ }
+
op_ret = posix_pstat (this, NULL, real_path, &stbuf);
if (op_ret == -1) {
op_errno = errno;
@@ -1313,14 +1313,6 @@ posix_mkdir (call_frame_t *frame, xlator_t *this,
entry_created = _gf_true;
- op_ret = posix_gfid_set (this, real_path, loc, xdata);
- if (op_ret) {
- gf_log (this->name, GF_LOG_ERROR,
- "setting gfid on %s failed", real_path);
- } else {
- gfid_set = _gf_true;
- }
-
#ifndef HAVE_SET_FSID
op_ret = chown (real_path, frame->root->uid, gid);
if (op_ret == -1) {
@@ -1345,6 +1337,14 @@ posix_mkdir (call_frame_t *frame, xlator_t *this,
strerror (errno));
}
+ op_ret = posix_gfid_set (this, real_path, loc, xdata);
+ if (op_ret) {
+ gf_log (this->name, GF_LOG_ERROR,
+ "setting gfid on %s failed", real_path);
+ } else {
+ gfid_set = _gf_true;
+ }
+
op_ret = posix_pstat (this, NULL, real_path, &stbuf);
if (op_ret == -1) {
op_errno = errno;
@@ -1740,14 +1740,6 @@ posix_symlink (call_frame_t *frame, xlator_t *this,
entry_created = _gf_true;
- op_ret = posix_gfid_set (this, real_path, loc, xdata);
- if (op_ret) {
- gf_log (this->name, GF_LOG_ERROR,
- "setting gfid on %s failed", real_path);
- } else {
- gfid_set = _gf_true;
- }
-
#ifndef HAVE_SET_FSID
op_ret = lchown (real_path, frame->root->uid, gid);
if (op_ret == -1) {
@@ -1780,6 +1772,14 @@ ignore:
strerror (errno));
}
+ op_ret = posix_gfid_set (this, real_path, loc, xdata);
+ if (op_ret) {
+ gf_log (this->name, GF_LOG_ERROR,
+ "setting gfid on %s failed", real_path);
+ } else {
+ gfid_set = _gf_true;
+ }
+
op_ret = posix_pstat (this, NULL, real_path, &stbuf);
if (op_ret == -1) {
op_errno = errno;
@@ -2285,14 +2285,6 @@ posix_create (call_frame_t *frame, xlator_t *this,
if (was_present)
goto fill_stat;
- op_ret = posix_gfid_set (this, real_path, loc, xdata);
- if (op_ret) {
- gf_log (this->name, GF_LOG_ERROR,
- "setting gfid on %s failed", real_path);
- } else {
- gfid_set = _gf_true;
- }
-
#ifndef HAVE_SET_FSID
op_ret = chown (real_path, frame->root->uid, gid);
if (op_ret == -1) {
@@ -2325,6 +2317,14 @@ ignore:
}
fill_stat:
+ op_ret = posix_gfid_set (this, real_path, loc, xdata);
+ if (op_ret) {
+ gf_log (this->name, GF_LOG_ERROR,
+ "setting gfid on %s failed", real_path);
+ } else {
+ gfid_set = _gf_true;
+ }
+
op_ret = posix_fdstat (this, _fd, &stbuf);
if (op_ret == -1) {
op_errno = errno;