diff options
Diffstat (limited to 'xlators/mount/fuse/src/fuse-bridge.c')
| -rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.c | 10 | 
1 files changed, 6 insertions, 4 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index 525e7605a45..6735ae464c6 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -3839,7 +3839,8 @@ notify_kernel_loop (void *data)          xlator_t               *this = NULL;          fuse_private_t         *priv = NULL;          struct fuse_out_header *fouh = NULL; -        int                     rv   = 0; +        ssize_t                 rv   = 0; +        ssize_t                 len  = 0;          fuse_invalidate_node_t *node = NULL;          this = data; @@ -3865,17 +3866,18 @@ notify_kernel_loop (void *data)                  fouh = (struct fuse_out_header *)node->inval_buf; +                len = fouh->len;                  rv = write (priv->fd, node->inval_buf, fouh->len); -                GF_FREE (node); - -                if (rv != fouh->len && !(rv == -1 && errno == ENOENT)) +                if (rv != len && !(rv == -1 && errno == ENOENT))                          break; +                GF_FREE (node);          }          gf_log ("glusterfs-fuse", GF_LOG_INFO,                  "kernel notifier loop terminated"); +        GF_FREE (node);          return NULL;  }  #endif  | 
