Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 12035
b: refs/heads/master
c: ff5dbd9
h: refs/heads/master
i:
  12033: 1a63932
  12031: f85e109
v: v3
  • Loading branch information
Steve French committed Aug 25, 2005
1 parent c8b20d4 commit 998bfb5
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e2a98a7543696306346ba8302a8df6cedf20fdfc
refs/heads/master: ff5dbd9ead0d82466cab8bdbdcbc9666707d328a
17 changes: 17 additions & 0 deletions trunk/fs/cifs/cifsglob.h
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,20 @@ struct oplock_q_entry {
__u16 netfid;
};

/* for pending dnotify requests */
struct dir_notify_req {
struct list_head lhead;
__le16 Pid;
__le16 PidHigh;
__u16 Mid;
__u16 Tid;
__u16 Uid;
__u16 netfid;
__u32 filter; /* CompletionFilter (for multishot) */
int multishot;
struct dentry * dentry;
};

#define MID_FREE 0
#define MID_REQUEST_ALLOCATED 1
#define MID_REQUEST_SUBMITTED 2
Expand Down Expand Up @@ -459,6 +473,9 @@ GLOBAL_EXTERN rwlock_t GlobalSMBSeslock; /* protects list inserts on 3 above */

GLOBAL_EXTERN struct list_head GlobalOplock_Q;

GLOBAL_EXTERN struct list_head GlobalDnotifyReqList; /* Outstanding dir notify requests */
GLOBAL_EXTERN struct list_head GlobalDnotifyRsp_Q; /* Dir notify response queue */

/*
* Global transaction id (XID) information
*/
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/cifs/cifspdu.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
#define SMB_COM_NT_TRANSACT 0xA0
#define SMB_COM_NT_TRANSACT_SECONDARY 0xA1
#define SMB_COM_NT_CREATE_ANDX 0xA2
#define SMB_COM_NT_CANCEL 0xA4 /* no response */
#define SMB_COM_NT_RENAME 0xA5 /* trivial response */

/* Transact2 subcommand codes */
Expand Down
16 changes: 16 additions & 0 deletions trunk/fs/cifs/cifssmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -4015,6 +4015,22 @@ int CIFSSMBNotify(const int xid, struct cifsTconInfo *tcon,
(struct smb_hdr *) pSMBr, &bytes_returned, -1);
if (rc) {
cFYI(1, ("Error in Notify = %d", rc));
} else {
/* Add file to outstanding requests */
dnotify_req = (struct dir_notify_req *) kmalloc(
sizeof(struct dir_notify_req), GFP_KERNEL);
dnotify_req->Pid = pSMB->hdr.Pid;
dnotify_req->PidHigh = pSMB->hdr.PidHigh;
dnotify_req->Mid = pSMB->hdr.Mid;
dnotify_req->Tid = pSMB->hdr.Tid;
dnotify_req->Uid = pSMB->hdr.Uid;
dnotify_req->netfid = netfid;
dnotify_req->dentry = dentry;
dnotify_req->filter = filter;
dnotify_req->multishot = multishot;
spin_lock(&GlobalMid_Lock);
list_add_tail(&dnotify_req->lhead, &GlobalDnotifyReqList);
spin_unlock(&GlobalMid_Lock);
}
cifs_buf_release(pSMB);
return rc;
Expand Down

0 comments on commit 998bfb5

Please sign in to comment.