diff options
| -rw-r--r-- | fs/cifs/smb2file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/smb2file.c b/fs/cifs/smb2file.c index f9e766f464be..b2aff0c6f22c 100644 --- a/fs/cifs/smb2file.c +++ b/fs/cifs/smb2file.c | |||
| @@ -260,7 +260,7 @@ smb2_push_mandatory_locks(struct cifsFileInfo *cfile) | |||
| 260 | * and check it for zero before using. | 260 | * and check it for zero before using. |
| 261 | */ | 261 | */ |
| 262 | max_buf = tlink_tcon(cfile->tlink)->ses->server->maxBuf; | 262 | max_buf = tlink_tcon(cfile->tlink)->ses->server->maxBuf; |
| 263 | if (!max_buf) { | 263 | if (max_buf < sizeof(struct smb2_lock_element)) { |
| 264 | free_xid(xid); | 264 | free_xid(xid); |
| 265 | return -EINVAL; | 265 | return -EINVAL; |
| 266 | } | 266 | } |
