diff options
Diffstat (limited to 'libglusterfsclient/src/libglusterfsclient.c')
| -rwxr-xr-x | libglusterfsclient/src/libglusterfsclient.c | 22 | 
1 files changed, 22 insertions, 0 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c index de9eed55f7f..ea4998f12c0 100755 --- a/libglusterfsclient/src/libglusterfsclient.c +++ b/libglusterfsclient/src/libglusterfsclient.c @@ -3593,6 +3593,28 @@ out:          return dirfd;  } +int +glusterfs_closedir (glusterfs_dir_t dirfd) +{ +        int                             op_ret = -1; +        libglusterfs_client_fd_ctx_t    *fdctx = NULL; + +        GF_VALIDATE_OR_GOTO (LIBGF_XL_NAME, dirfd, out); +        fdctx = libgf_get_fd_ctx (dirfd); + +        if (fdctx == NULL) { +                errno = EBADF; +                op_ret = -1; +                goto out; +        } + +        op_ret = libgf_client_flush (fdctx->ctx, (fd_t *)dirfd); +        fd_unref ((fd_t *)dirfd); + +out: +        return op_ret; +} +  static struct xlator_fops libgf_client_fops = {  };  | 
