diff options
author | Pavel Shilovsky <pshilovsky@samba.org> | 2012-09-19 01:20:32 +0200 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2012-09-25 04:46:29 +0200 |
commit | 92fc65a74a2be1388d774f7dbf82c9adea1745cf (patch) | |
tree | 262ccb0fcb9edbf09cd2480facaa9135ec511088 /fs/cifs/smb1ops.c | |
parent | CIFS: Add set_file_info support for SMB2 (diff) | |
download | linux-92fc65a74a2be1388d774f7dbf82c9adea1745cf.tar.xz linux-92fc65a74a2be1388d774f7dbf82c9adea1745cf.zip |
CIFS: Move readdir code to ops struct
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/smb1ops.c')
-rw-r--r-- | fs/cifs/smb1ops.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c index ed311968437a..068d609bd02a 100644 --- a/fs/cifs/smb1ops.c +++ b/fs/cifs/smb1ops.c @@ -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 = { |