From: Jule Anger Date: Mon, 9 May 2022 10:09:18 +0000 (+0200) Subject: smbstatus: delete wrong EXCLUSIVE+BATCH oplock X-Git-Tag: samba-4.17.0rc1~49 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6412c39bbfaa5ab916b5637023c842c47c970b89;p=thirdparty%2Fsamba.git smbstatus: delete wrong EXCLUSIVE+BATCH oplock It is not possible to have an EXCLUSIVE+BATCH oplock, because a BATCH oplock includes an EXCLUSIVE oplock. Therefore, an EXCLUSIVE+BATCH-Oplock and a BATCH-Oplock are the same thing. Signed-off-by: Jule Anger Reviewed-by: Ralph Boehme --- diff --git a/source3/utils/status.c b/source3/utils/status.c index e860436d72b..37d3b097564 100644 --- a/source3/utils/status.c +++ b/source3/utils/status.c @@ -179,13 +179,10 @@ static int print_share_mode(struct file_id fid, d_printf("RDONLY "); } - if((e->op_type & (EXCLUSIVE_OPLOCK|BATCH_OPLOCK)) == - (EXCLUSIVE_OPLOCK|BATCH_OPLOCK)) { - d_printf("EXCLUSIVE+BATCH "); + if (e->op_type & BATCH_OPLOCK) { + d_printf("BATCH "); } else if (e->op_type & EXCLUSIVE_OPLOCK) { d_printf("EXCLUSIVE "); - } else if (e->op_type & BATCH_OPLOCK) { - d_printf("BATCH "); } else if (e->op_type & LEVEL_II_OPLOCK) { d_printf("LEVEL_II "); } else if (e->op_type == LEASE_OPLOCK) {