cifsd: Update access check in set_file_allocation_info/set_end_of_file_info

[MS-SMB2] 3.3.5.21.1
  If the object store supports security and FileInfoClass is
  FileAllocationInformation, FileEndOfFileInformation, or
  FileValidDataLengthInformation, and Open.GrantedAccess does not
  include FILE_WRITE_DATA, the server MUST fail the request with
  STATUS_ACCESS_DENIED.

Signed-off-by: Marios Makassikis <mmakassikis@freebox.fr>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
diff --git a/fs/cifsd/smb2pdu.c b/fs/cifsd/smb2pdu.c
index 343e96c..73c6154 100644
--- a/fs/cifsd/smb2pdu.c
+++ b/fs/cifsd/smb2pdu.c
@@ -5352,7 +5352,7 @@ static int set_file_allocation_info(struct ksmbd_work *work,
 	struct inode *inode;
 	int rc;
 
-	if (!is_attributes_write_allowed(fp))
+	if (!(fp->daccess & FILE_WRITE_DATA_LE))
 		return -EACCES;
 
 	file_alloc_info = (struct smb2_file_alloc_info *)buf;
@@ -5396,7 +5396,7 @@ static int set_end_of_file_info(struct ksmbd_work *work, struct ksmbd_file *fp,
 	struct inode *inode;
 	int rc;
 
-	if (!is_attributes_write_allowed(fp))
+	if (!(fp->daccess & FILE_WRITE_DATA_LE))
 		return -EACCES;
 
 	file_eof_info = (struct smb2_file_eof_info *)buf;