Skip to content

Commit

Permalink
vfs_ceph{_new}: do not set errno upon successful call to libcephfs
Browse files Browse the repository at this point in the history
There is code in Samba that expects errno from a previous system call
to be preserved through a subsequent system call. Thus, avoid setting
"errno = 0" in status_code() and lstatus_code() upon successful return
from libcephfs API call.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15686

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
(cherry picked from commit a7f4e2bd47c7f4728f3ac8d90af693156a69c557)

Autobuild-User(v4-20-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-20-test): Thu Aug 22 10:34:46 UTC 2024 on atb-devel-224
  • Loading branch information
synarete authored and Jule Anger committed Aug 22, 2024
1 parent 92712fc commit b9d9bec
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions source3/modules/vfs_ceph.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ static inline int status_code(int ret)
errno = -ret;
return -1;
}
errno = 0;
return ret;
}

Expand All @@ -76,7 +75,6 @@ static inline ssize_t lstatus_code(intmax_t ret)
errno = -((int)ret);
return -1;
}
errno = 0;
return (ssize_t)ret;
}

Expand Down

0 comments on commit b9d9bec

Please sign in to comment.