summaryrefslogtreecommitdiffstats
path: root/xlators/mount/fuse/src/fuse-bridge.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mount/fuse/src/fuse-bridge.c')
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index e9c5383e65a..e531970e5c4 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -2919,6 +2919,8 @@ fuse_setxattr (xlator_t *this, fuse_in_header_t *finh, void *msg)
priv = this->private;
+ GET_STATE (this, finh, state);
+
#ifdef GF_DARWIN_HOST_OS
if (fsi->position) {
gf_log ("glusterfs-fuse", GF_LOG_WARNING,
@@ -2977,7 +2979,6 @@ fuse_setxattr (xlator_t *this, fuse_in_header_t *finh, void *msg)
return;
}
- GET_STATE (this, finh, state);
state->size = fsi->size;
fuse_resolve_inode_init (state, &state->resolve, finh->nodeid);
@@ -3210,6 +3211,8 @@ fuse_getxattr (xlator_t *this, fuse_in_header_t *finh, void *msg)
priv = this->private;
+ GET_STATE (this, finh, state);
+
#ifdef GF_DARWIN_HOST_OS
if (fgxi->position) {
/* position can be used only for
@@ -3247,8 +3250,6 @@ fuse_getxattr (xlator_t *this, fuse_in_header_t *finh, void *msg)
}
}
- GET_STATE (this, finh, state);
-
fuse_resolve_inode_init (state, &state->resolve, finh->nodeid);
rv = fuse_flip_xattr_ns (priv, name, &newkey);
@@ -4425,7 +4426,7 @@ fuse_thread_proc (void *data)
fuse_private_t *priv = NULL;
ssize_t res = 0;
struct iobuf *iobuf = NULL;
- fuse_in_header_t *finh;
+ fuse_in_header_t *finh = NULL;
struct iovec iov_in[2];
void *msg = NULL;
const size_t msg0_size = sizeof (*finh) + 128;