Commit 9eaa23ae authored by Steve French's avatar Steve French Committed by Steve French

[CIFS] Do not block on FindNotify response

Signed-off-by: Steve French (sfrench@us.ibm.com)
parent bcbf96c5
Version 1.27
------------
Turn off DNOTIFY (directory change notification support) by default
(unless built with the experimental flag) to fix hang with KDE
file browser. Fix DNOTIFY flag mappings. Fix hang (in wait_event
waiting on an SMB response) in SendReceive when session dies but
reconnects quickly from another task.
Version 1.26
------------
Add setfacl support to allow setting of ACLs remotely to Samba 3.10 and later
......
......@@ -90,5 +90,5 @@ extern int cifs_setxattr(struct dentry *, const char *, const void *,
size_t, int);
extern ssize_t cifs_getxattr(struct dentry *, const char *, void *, size_t);
extern ssize_t cifs_listxattr(struct dentry *, char *, size_t);
#define CIFS_VERSION "1.26"
#define CIFS_VERSION "1.27"
#endif /* _CIFSFS_H */
......@@ -3772,7 +3772,7 @@ int CIFSSMBNotify(const int xid, struct cifsTconInfo *tcon,
pSMB->ByteCount = 0;
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
(struct smb_hdr *) pSMBr, &bytes_returned, -1);
if (rc) {
cFYI(1, ("Error in Notify = %d", rc));
}
......
......@@ -175,7 +175,7 @@ cifs_buf_release(void *buf_to_free)
{
if (buf_to_free == NULL) {
cFYI(1, ("Null buffer passed to cifs_buf_release"));
/* cFYI(1, ("Null buffer passed to cifs_buf_release"));*/
return;
}
mempool_free(buf_to_free,cifs_req_poolp);
......@@ -390,8 +390,29 @@ is_valid_oplock_break(struct smb_hdr *buf)
struct cifsTconInfo *tcon;
struct cifsFileInfo *netfile;
/* could add check for smb response flag 0x80 */
cFYI(1,("Checking for oplock break"));
cFYI(1,("Checking for oplock break or dnotify response"));
if((pSMB->hdr.Command == SMB_COM_NT_TRANSACT) &&
(pSMB->hdr.Flags & SMBFLG_RESPONSE)) {
struct smb_com_transaction_change_notify_rsp * pSMBr =
(struct smb_com_transaction_change_notify_rsp *)buf;
struct file_notify_information * pnotify;
__u32 data_offset = 0;
if(pSMBr->ByteCount > sizeof(struct file_notify_information)) {
data_offset = le32_to_cpu(pSMBr->DataOffset);
pnotify = (struct file_notify_information *)((char *)&pSMBr->hdr.Protocol
+ data_offset);
cFYI(1,("dnotify on %s with action: 0x%x",pnotify->FileName,
pnotify->Action)); /* BB removeme BB */
/* cifs_dump_mem("Received notify Data is: ",buf,sizeof(struct smb_hdr)+60); */
return TRUE;
}
if(pSMBr->hdr.Status.CifsError) {
cFYI(1,("notify err 0x%d",pSMBr->hdr.Status.CifsError));
return TRUE;
}
return FALSE;
}
if(pSMB->hdr.Command != SMB_COM_LOCKING_ANDX)
return FALSE;
if(pSMB->hdr.Flags & SMBFLG_RESPONSE) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment