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

Commit 1adcb710 authored by Steve French's avatar Steve French
Browse files

[CIFS] add extra null attr check



Although attr == NULL can not happen, this makes cifs_set_file_info safer
in the future since it may not be obvious that the caller can not set
attr to NULL.

Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
parent 4717bed6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -763,6 +763,9 @@ cifs_set_file_info(struct inode *inode, struct iattr *attrs, int xid,
	struct cifsTconInfo *pTcon = cifs_sb->tcon;
	FILE_BASIC_INFO	info_buf;

	if (attrs == NULL)
		return -EINVAL;

	if (attrs->ia_valid & ATTR_ATIME) {
		set_time = true;
		info_buf.LastAccessTime =