1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-20 22:50:26 +03:00

smbd: Remove return variable for releasing filesystem sharemode

flock is no longer used, the existing "ret" variable can be used
instead.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Christof Schmitt 2021-09-20 15:50:08 -07:00
parent fa3f952f3e
commit 0a2b501145

View File

@ -452,14 +452,12 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp,
}
if (fsp->fsp_flags.kernel_share_modes_taken) {
int ret_flock;
/*
* A file system sharemode could block the unlink;
* remove filesystem sharemodes first.
*/
ret_flock = SMB_VFS_FILESYSTEM_SHAREMODE(fsp, 0, 0);
if (ret_flock == -1) {
ret = SMB_VFS_FILESYSTEM_SHAREMODE(fsp, 0, 0);
if (ret == -1) {
DBG_INFO("removing kernel flock for %s failed: %s\n",
fsp_str_dbg(fsp), strerror(errno));
}
@ -516,11 +514,9 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp,
}
if (fsp->fsp_flags.kernel_share_modes_taken) {
int ret_flock;
/* remove filesystem sharemodes */
ret_flock = SMB_VFS_FILESYSTEM_SHAREMODE(fsp, 0, 0);
if (ret_flock == -1) {
ret = SMB_VFS_FILESYSTEM_SHAREMODE(fsp, 0, 0);
if (ret == -1) {
DEBUG(2, ("close_remove_share_mode: removing kernel "
"flock for %s failed: %s\n",
fsp_str_dbg(fsp), strerror(errno)));