cifsd: set epoch in smb2_lease_break response

When running generic/591 after smb2 leases is enable, all smb2 lease ack
requests failed in ksmbd. because cifs client seems to support only smb2
v2 lease. So cifs doesn't update lease state in ack request if epoch is
not set in smb2 lease break request from ksmbd. epoch is used for smb2
v2 leases. So this patch add smb2 create v2 lease context and set
increased epoch in smb2 lease break response.

Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
diff --git a/fs/cifsd/oplock.h b/fs/cifsd/oplock.h
index 0abd261..9fb7ea7 100644
--- a/fs/cifsd/oplock.h
+++ b/fs/cifsd/oplock.h
@@ -37,11 +37,12 @@
 #define SMB2_LEASE_KEY_SIZE		16
 
 struct lease_ctx_info {
-	__u8	lease_key[SMB2_LEASE_KEY_SIZE];
-	__le32	req_state;
-	__le32	flags;
-	__le64	duration;
-	int dlease;
+	__u8			lease_key[SMB2_LEASE_KEY_SIZE];
+	__le32			req_state;
+	__le32			flags;
+	__le64			duration;
+	__u8			parent_lease_key[SMB2_LEASE_KEY_SIZE];
+	int			version;
 };
 
 struct lease_table {
@@ -57,6 +58,9 @@ struct lease {
 	__le32			new_state;
 	__le32			flags;
 	__le64			duration;
+	__u8			parent_lease_key[SMB2_LEASE_KEY_SIZE];
+	int			version;
+	unsigned short		epoch;
 	struct lease_table	*l_lb;
 };
 
@@ -86,6 +90,7 @@ struct oplock_info {
 struct lease_break_info {
 	__le32			curr_state;
 	__le32			new_state;
+	__le16			epoch;
 	char			lease_key[SMB2_LEASE_KEY_SIZE];
 };