mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
[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: Steve French <sfrench@us.ibm.com>
This commit is contained in:
parent
4717bed680
commit
1adcb71092
1 changed files with 3 additions and 0 deletions
|
@ -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 =
|
||||
|
|
Loading…
Reference in a new issue