mirror of https://gitee.com/openkylin/linux.git
[CIFS] Change notify support part 3
Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
parent
abb15b8ae4
commit
167a251ad6
|
@ -402,7 +402,7 @@ struct dir_notify_req {
|
||||||
__u16 netfid;
|
__u16 netfid;
|
||||||
__u32 filter; /* CompletionFilter (for multishot) */
|
__u32 filter; /* CompletionFilter (for multishot) */
|
||||||
int multishot;
|
int multishot;
|
||||||
struct dentry * dentry;
|
struct file * dentry;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MID_FREE 0
|
#define MID_FREE 0
|
||||||
|
|
|
@ -275,7 +275,8 @@ extern int CIFSSMBCopy(int xid,
|
||||||
int remap_special_chars);
|
int remap_special_chars);
|
||||||
extern int CIFSSMBNotify(const int xid, struct cifsTconInfo *tcon,
|
extern int CIFSSMBNotify(const int xid, struct cifsTconInfo *tcon,
|
||||||
const int notify_subdirs,const __u16 netfid,
|
const int notify_subdirs,const __u16 netfid,
|
||||||
__u32 filter, const struct nls_table *nls_codepage);
|
__u32 filter, struct file * file, int multishot,
|
||||||
|
const struct nls_table *nls_codepage);
|
||||||
extern ssize_t CIFSSMBQAllEAs(const int xid, struct cifsTconInfo *tcon,
|
extern ssize_t CIFSSMBQAllEAs(const int xid, struct cifsTconInfo *tcon,
|
||||||
const unsigned char *searchName, char * EAData,
|
const unsigned char *searchName, char * EAData,
|
||||||
size_t bufsize, const struct nls_table *nls_codepage,
|
size_t bufsize, const struct nls_table *nls_codepage,
|
||||||
|
|
|
@ -3977,8 +3977,9 @@ CIFSSMBUnixSetPerms(const int xid, struct cifsTconInfo *tcon,
|
||||||
}
|
}
|
||||||
|
|
||||||
int CIFSSMBNotify(const int xid, struct cifsTconInfo *tcon,
|
int CIFSSMBNotify(const int xid, struct cifsTconInfo *tcon,
|
||||||
const int notify_subdirs, const __u16 netfid,
|
const int notify_subdirs, const __u16 netfid,
|
||||||
__u32 filter, const struct nls_table *nls_codepage)
|
__u32 filter, struct file * pfile, int multishot,
|
||||||
|
const struct nls_table *nls_codepage)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
struct smb_com_transaction_change_notify_req * pSMB = NULL;
|
struct smb_com_transaction_change_notify_req * pSMB = NULL;
|
||||||
|
@ -4026,7 +4027,7 @@ int CIFSSMBNotify(const int xid, struct cifsTconInfo *tcon,
|
||||||
dnotify_req->Tid = pSMB->hdr.Tid;
|
dnotify_req->Tid = pSMB->hdr.Tid;
|
||||||
dnotify_req->Uid = pSMB->hdr.Uid;
|
dnotify_req->Uid = pSMB->hdr.Uid;
|
||||||
dnotify_req->netfid = netfid;
|
dnotify_req->netfid = netfid;
|
||||||
dnotify_req->dentry = dentry;
|
dnotify_req->pfile = pfile;
|
||||||
dnotify_req->filter = filter;
|
dnotify_req->filter = filter;
|
||||||
dnotify_req->multishot = multishot;
|
dnotify_req->multishot = multishot;
|
||||||
spin_lock(&GlobalMid_Lock);
|
spin_lock(&GlobalMid_Lock);
|
||||||
|
|
|
@ -100,8 +100,10 @@ int cifs_dir_notify(struct file * file, unsigned long arg)
|
||||||
} else {
|
} else {
|
||||||
filter = convert_to_cifs_notify_flags(arg);
|
filter = convert_to_cifs_notify_flags(arg);
|
||||||
if(filter != 0) {
|
if(filter != 0) {
|
||||||
rc = CIFSSMBNotify(xid, pTcon, 0 /* no subdirs */, netfid,
|
rc = CIFSSMBNotify(xid, pTcon,
|
||||||
filter, cifs_sb->local_nls);
|
0 /* no subdirs */, netfid,
|
||||||
|
filter, file, arg & DN_MULTISHOT,
|
||||||
|
cifs_sb->local_nls);
|
||||||
} else {
|
} else {
|
||||||
rc = -EINVAL;
|
rc = -EINVAL;
|
||||||
}
|
}
|
||||||
|
@ -109,7 +111,7 @@ int cifs_dir_notify(struct file * file, unsigned long arg)
|
||||||
it would close automatically but may be a way
|
it would close automatically but may be a way
|
||||||
to do it easily when inode freed or when
|
to do it easily when inode freed or when
|
||||||
notify info is cleared/changed */
|
notify info is cleared/changed */
|
||||||
cERROR(1,("notify rc %d",rc));
|
cFYI(1,("notify rc %d",rc));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue