Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d5a288d authored by Ronnie Sahlberg's avatar Ronnie Sahlberg Committed by Steve French
Browse files

cifs: remove struct smb2_oplock_break_rsp



The two structures smb2_oplock_breaq_req/rsp are now basically identical.
Replace this with a single definition of a smb2_oplock_break structure.

Signed-off-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 977b6170
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -617,7 +617,7 @@ smb2_is_valid_lease_break(char *buffer)
bool
bool
smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server)
smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server)
{
{
	struct smb2_oplock_break_rsp *rsp = (struct smb2_oplock_break_rsp *)buffer;
	struct smb2_oplock_break *rsp = (struct smb2_oplock_break *)buffer;
	struct list_head *tmp, *tmp1, *tmp2;
	struct list_head *tmp, *tmp1, *tmp2;
	struct cifs_ses *ses;
	struct cifs_ses *ses;
	struct cifs_tcon *tcon;
	struct cifs_tcon *tcon;
@@ -626,7 +626,7 @@ smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server)


	cifs_dbg(FYI, "Checking for oplock break\n");
	cifs_dbg(FYI, "Checking for oplock break\n");


	if (rsp->hdr.sync_hdr.Command != SMB2_OPLOCK_BREAK)
	if (rsp->sync_hdr.Command != SMB2_OPLOCK_BREAK)
		return false;
		return false;


	if (rsp->StructureSize !=
	if (rsp->StructureSize !=
+1 −1
Original line number Original line Diff line number Diff line
@@ -3663,7 +3663,7 @@ SMB2_oplock_break(const unsigned int xid, struct cifs_tcon *tcon,
		  __u8 oplock_level)
		  __u8 oplock_level)
{
{
	int rc;
	int rc;
	struct smb2_oplock_break_req *req = NULL;
	struct smb2_oplock_break *req = NULL;
	struct cifs_ses *ses = tcon->ses;
	struct cifs_ses *ses = tcon->ses;
	int flags = CIFS_OBREAK_OP;
	int flags = CIFS_OBREAK_OP;
	unsigned int total_len;
	unsigned int total_len;
+1 −13
Original line number Original line Diff line number Diff line
@@ -1165,8 +1165,7 @@ struct smb2_set_info_rsp {
	__le16 StructureSize; /* Must be 2 */
	__le16 StructureSize; /* Must be 2 */
} __packed;
} __packed;


/* oplock break without an rfc1002 header */
struct smb2_oplock_break {
struct smb2_oplock_break_req {
	struct smb2_sync_hdr sync_hdr;
	struct smb2_sync_hdr sync_hdr;
	__le16 StructureSize; /* Must be 24 */
	__le16 StructureSize; /* Must be 24 */
	__u8   OplockLevel;
	__u8   OplockLevel;
@@ -1176,17 +1175,6 @@ struct smb2_oplock_break_req {
	__u64  VolatileFid;
	__u64  VolatileFid;
} __packed;
} __packed;


/* oplock break with an rfc1002 header */
struct smb2_oplock_break_rsp {
	struct smb2_hdr hdr;
	__le16 StructureSize; /* Must be 24 */
	__u8   OplockLevel;
	__u8   Reserved;
	__le32 Reserved2;
	__u64  PersistentFid;
	__u64  VolatileFid;
} __packed;

#define SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED cpu_to_le32(0x01)
#define SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED cpu_to_le32(0x01)


struct smb2_lease_break {
struct smb2_lease_break {