Commit 7c525ddd authored by Thorsten Blum's avatar Thorsten Blum Committed by Steve French

ksmbd: Replace one-element arrays with flexible-array members

Replace the deprecated one-element arrays with flexible-array members
in the structs filesystem_attribute_info and filesystem_device_info.

There are no binary differences after this conversion.

Link: https://github.com/KSPP/linux/issues/79Signed-off-by: default avatarThorsten Blum <thorsten.blum@toblux.com>
Reviewed-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Acked-by: default avatarNamjae Jeon <linkinjeon@kernel.org>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 4fdd8664
...@@ -5360,7 +5360,7 @@ static int smb2_get_info_filesystem(struct ksmbd_work *work, ...@@ -5360,7 +5360,7 @@ static int smb2_get_info_filesystem(struct ksmbd_work *work,
"NTFS", PATH_MAX, conn->local_nls, 0); "NTFS", PATH_MAX, conn->local_nls, 0);
len = len * 2; len = len * 2;
info->FileSystemNameLen = cpu_to_le32(len); info->FileSystemNameLen = cpu_to_le32(len);
sz = sizeof(struct filesystem_attribute_info) - 2 + len; sz = sizeof(struct filesystem_attribute_info) + len;
rsp->OutputBufferLength = cpu_to_le32(sz); rsp->OutputBufferLength = cpu_to_le32(sz);
break; break;
} }
...@@ -5386,7 +5386,7 @@ static int smb2_get_info_filesystem(struct ksmbd_work *work, ...@@ -5386,7 +5386,7 @@ static int smb2_get_info_filesystem(struct ksmbd_work *work,
len = len * 2; len = len * 2;
info->VolumeLabelSize = cpu_to_le32(len); info->VolumeLabelSize = cpu_to_le32(len);
info->Reserved = 0; info->Reserved = 0;
sz = sizeof(struct filesystem_vol_info) - 2 + len; sz = sizeof(struct filesystem_vol_info) + len;
rsp->OutputBufferLength = cpu_to_le32(sz); rsp->OutputBufferLength = cpu_to_le32(sz);
break; break;
} }
......
...@@ -213,7 +213,7 @@ struct filesystem_attribute_info { ...@@ -213,7 +213,7 @@ struct filesystem_attribute_info {
__le32 Attributes; __le32 Attributes;
__le32 MaxPathNameComponentLength; __le32 MaxPathNameComponentLength;
__le32 FileSystemNameLen; __le32 FileSystemNameLen;
__le16 FileSystemName[1]; /* do not have to save this - get subset? */ __le16 FileSystemName[]; /* do not have to save this - get subset? */
} __packed; } __packed;
struct filesystem_device_info { struct filesystem_device_info {
...@@ -226,7 +226,7 @@ struct filesystem_vol_info { ...@@ -226,7 +226,7 @@ struct filesystem_vol_info {
__le32 SerialNumber; __le32 SerialNumber;
__le32 VolumeLabelSize; __le32 VolumeLabelSize;
__le16 Reserved; __le16 Reserved;
__le16 VolumeLabel[1]; __le16 VolumeLabel[];
} __packed; } __packed;
struct filesystem_info { struct filesystem_info {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment