glusterfs

Форк
0
/
cloudsync-common.c 
60 строк · 1.3 Кб
1
/*
2
  Copyright (c) 2018 Red Hat, Inc. <http://www.redhat.com>
3
  This file is part of GlusterFS.
4

5
  This file is licensed to you under your choice of the GNU Lesser
6
  General Public License, version 3 or any later version (LGPLv3 or
7
  later), or the GNU General Public License, version 2 (GPLv2), in all
8
  cases as published by the Free Software Foundation.
9
*/
10

11
#include "cloudsync-common.h"
12

13
void
14
cs_xattrinfo_wipe(cs_local_t *local)
15
{
16
    if (local->xattrinfo.lxattr) {
17
        if (local->xattrinfo.lxattr->file_path)
18
            GF_FREE(local->xattrinfo.lxattr->file_path);
19

20
        if (local->xattrinfo.lxattr->volname)
21
            GF_FREE(local->xattrinfo.lxattr->volname);
22

23
        GF_FREE(local->xattrinfo.lxattr);
24
    }
25
}
26

27
void
28
cs_local_wipe(xlator_t *this, cs_local_t *local)
29
{
30
    if (!local)
31
        return;
32

33
    loc_wipe(&local->loc);
34

35
    if (local->fd) {
36
        fd_unref(local->fd);
37
        local->fd = NULL;
38
    }
39

40
    if (local->stub) {
41
        call_stub_destroy(local->stub);
42
        local->stub = NULL;
43
    }
44

45
    if (local->xattr_req)
46
        dict_unref(local->xattr_req);
47

48
    if (local->xattr_rsp)
49
        dict_unref(local->xattr_rsp);
50

51
    if (local->dlfd)
52
        fd_unref(local->dlfd);
53

54
    if (local->remotepath)
55
        GF_FREE(local->remotepath);
56

57
    cs_xattrinfo_wipe(local);
58

59
    mem_put(local);
60
}
61

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.