]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: VFS: ceph_snapshots: Move two more uses of OpenDir() -> OpenDir_nstatus().
authorJeremy Allison <jra@samba.org>
Mon, 28 Feb 2022 21:28:30 +0000 (13:28 -0800)
committerVolker Lendecke <vl@samba.org>
Wed, 2 Mar 2022 21:04:34 +0000 (21:04 +0000)
Eventually we can replace OpenDir() with OpenDir_ntatatus().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/modules/vfs_ceph_snapshots.c

index dd7c431dd9e8777fe06bf49a3f0054a758e27f84..ca188726ee9add6031f98c317cdbf425b1889b55 100644 (file)
@@ -236,9 +236,14 @@ static int ceph_snap_enum_snapdir(struct vfs_handle_struct *handle,
         * via readdir.
         */
 
-       dir_hnd = OpenDir(frame, handle->conn, snaps_dname, NULL, 0);
-       if (dir_hnd == NULL) {
-               ret = -errno;
+       status = OpenDir_ntstatus(frame,
+                                 handle->conn,
+                                 snaps_dname,
+                                 NULL,
+                                 0,
+                                 &dir_hnd);
+       if (!NT_STATUS_IS_OK(status)) {
+               ret = -map_errno_from_nt_status(status);
                goto err_out;
        }
 
@@ -559,9 +564,14 @@ static int ceph_snap_gmt_convert_dir(struct vfs_handle_struct *handle,
        DBG_DEBUG("enumerating shadow copy dir at %s\n",
                  snaps_dname->base_name);
 
-       dir_hnd = OpenDir(tmp_ctx, handle->conn, snaps_dname, NULL, 0);
-       if (dir_hnd == NULL) {
-               ret = -errno;
+       status = OpenDir_ntstatus(tmp_ctx,
+                                 handle->conn,
+                                 snaps_dname,
+                                 NULL,
+                                 0,
+                                 &dir_hnd);
+       if (!NT_STATUS_IS_OK(status)) {
+               ret = -map_errno_from_nt_status(status);
                goto err_out;
        }