|
@@ -575,8 +575,10 @@ reopen_error_exit:
|
|
|
|
|
|
int cifs_close(struct inode *inode, struct file *file)
|
|
|
{
|
|
|
- cifsFileInfo_put(file->private_data);
|
|
|
- file->private_data = NULL;
|
|
|
+ if (file->private_data != NULL) {
|
|
|
+ cifsFileInfo_put(file->private_data);
|
|
|
+ file->private_data = NULL;
|
|
|
+ }
|
|
|
|
|
|
/* return code from the ->release op is always ignored */
|
|
|
return 0;
|