diff options
author | Volker Lendecke <vl@samba.org> | 2019-11-09 20:55:29 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2019-11-12 20:56:34 +0000 |
commit | f7dc0334810723de5321f021e2d2be9d85a73939 (patch) | |
tree | 04e0eb9a58ac5468e48022d89f950dd1fe7c5d3d /source3 | |
parent | b0a486fabefaabd63cd2838e503360c0865e21dc (diff) | |
download | samba-f7dc0334810723de5321f021e2d2be9d85a73939.tar.gz |
smbd: Use file_id_str_buf() in linux_oplock_signal_handler()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/oplock_linux.c | 15 |
1 files 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; |