| 949 | } |
| 950 | |
| 951 | extern "C" int ceph_close_snapdiff(struct ceph_snapdiff_info* snapdiff) |
| 952 | { |
| 953 | if (!snapdiff->cmount || !snapdiff->cmount->is_mounted()) { |
| 954 | /* also sets errno to signal errors. */ |
| 955 | errno = ENOTCONN; |
| 956 | return -errno; |
| 957 | } |
| 958 | if (snapdiff->dir_aux) { |
| 959 | ceph_closedir(snapdiff->cmount, snapdiff->dir_aux); |
| 960 | } |
| 961 | if (snapdiff->dir1) { |
| 962 | ceph_closedir(snapdiff->cmount, snapdiff->dir1); |
| 963 | } |
| 964 | snapdiff->cmount = nullptr; |
| 965 | snapdiff->dir1 = snapdiff->dir_aux = nullptr; |
| 966 | return 0; |
| 967 | } |
| 968 | |
| 969 | extern "C" int ceph_getdents(struct ceph_mount_info *cmount, struct ceph_dir_result *dirp, |
| 970 | char *buf, int buflen) |