From f7dc0334810723de5321f021e2d2be9d85a73939 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 9 Nov 2019 20:55:29 +0100 Subject: [PATCH] smbd: Use file_id_str_buf() in linux_oplock_signal_handler() Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/smbd/oplock_linux.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/source3/smbd/oplock_linux.c b/source3/smbd/oplock_linux.c index 2a494ea05c1..bc5c08b7931 100644 --- a/source3/smbd/oplock_linux.c +++ b/source3/smbd/oplock_linux.c @@ -140,19 +140,22 @@ static void linux_oplock_signal_handler(struct tevent_context *ev_ctx, static bool linux_set_kernel_oplock(struct kernel_oplocks *ctx, files_struct *fsp, int oplock_type) { + struct file_id_buf idbuf; + if ( SMB_VFS_LINUX_SETLEASE(fsp, F_WRLCK) == -1) { - DEBUG(3,("linux_set_kernel_oplock: Refused oplock on file %s, " - "fd = %d, file_id = %s. (%s)\n", - fsp_str_dbg(fsp), fsp->fh->fd, - file_id_string_tos(&fsp->file_id), - strerror(errno))); + DBG_NOTICE("Refused oplock on file %s, " + "fd = %d, file_id = %s. (%s)\n", + fsp_str_dbg(fsp), + fsp->fh->fd, + file_id_str_buf(fsp->file_id, &idbuf), + strerror(errno)); return False; } DBG_NOTICE("got kernel oplock on file %s, " "file_id = %s gen_id = %"PRIu64"\n", fsp_str_dbg(fsp), - file_id_string_tos(&fsp->file_id), + file_id_str_buf(fsp->file_id, &idbuf), fsp->fh->gen_id); return True; -- 2.47.3