CIFS: Move readdir code to ops struct
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
This commit is contained in:

committed by
Steve French

orang tua
1feeaac753
melakukan
92fc65a74a
@@ -836,6 +836,33 @@ out:
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int
|
||||
cifs_query_dir_first(const unsigned int xid, struct cifs_tcon *tcon,
|
||||
const char *path, struct cifs_sb_info *cifs_sb,
|
||||
struct cifs_fid *fid, __u16 search_flags,
|
||||
struct cifs_search_info *srch_inf)
|
||||
{
|
||||
return CIFSFindFirst(xid, tcon, path, cifs_sb->local_nls,
|
||||
&fid->netfid, search_flags, srch_inf,
|
||||
cifs_sb->mnt_cifs_flags &
|
||||
CIFS_MOUNT_MAP_SPECIAL_CHR, CIFS_DIR_SEP(cifs_sb));
|
||||
}
|
||||
|
||||
static int
|
||||
cifs_query_dir_next(const unsigned int xid, struct cifs_tcon *tcon,
|
||||
struct cifs_fid *fid, __u16 search_flags,
|
||||
struct cifs_search_info *srch_inf)
|
||||
{
|
||||
return CIFSFindNext(xid, tcon, fid->netfid, search_flags, srch_inf);
|
||||
}
|
||||
|
||||
static int
|
||||
cifs_close_dir(const unsigned int xid, struct cifs_tcon *tcon,
|
||||
struct cifs_fid *fid)
|
||||
{
|
||||
return CIFSFindClose(xid, tcon, fid->netfid);
|
||||
}
|
||||
|
||||
struct smb_version_operations smb1_operations = {
|
||||
.send_cancel = send_nt_cancel,
|
||||
.compare_fids = cifs_compare_fids,
|
||||
@@ -891,6 +918,10 @@ struct smb_version_operations smb1_operations = {
|
||||
.async_writev = cifs_async_writev,
|
||||
.sync_read = cifs_sync_read,
|
||||
.sync_write = cifs_sync_write,
|
||||
.query_dir_first = cifs_query_dir_first,
|
||||
.query_dir_next = cifs_query_dir_next,
|
||||
.close_dir = cifs_close_dir,
|
||||
.calc_smb_size = smbCalcSize,
|
||||
};
|
||||
|
||||
struct smb_version_values smb1_values = {
|
||||
|
Reference in New Issue
Block a user