From: Jeremy Allison Date: Mon, 28 Feb 2022 21:28:30 +0000 (-0800) Subject: s3: VFS: ceph_snapshots: Move two more uses of OpenDir() -> OpenDir_nstatus(). X-Git-Tag: tevent-0.12.0~595 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=751237a28c3c8feee24818dea0525771e70dd08b;p=thirdparty%2Fsamba.git s3: VFS: ceph_snapshots: Move two more uses of OpenDir() -> OpenDir_nstatus(). Eventually we can replace OpenDir() with OpenDir_ntatatus(). Signed-off-by: Jeremy Allison Reviewed-by: Volker Lendecke --- diff --git a/source3/modules/vfs_ceph_snapshots.c b/source3/modules/vfs_ceph_snapshots.c index dd7c431dd9e..ca188726ee9 100644 --- a/source3/modules/vfs_ceph_snapshots.c +++ b/source3/modules/vfs_ceph_snapshots.c @@ -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; }