diff options
author | Pavel Shilovsky <pshilovsky@samba.org> | 2012-09-18 19:20:32 -0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2012-09-24 22:46:29 -0400 |
commit | 92fc65a74a2be1388d774f7dbf82c9adea1745cf (patch) | |
tree | 262ccb0fcb9edbf09cd2480facaa9135ec511088 /fs/cifs/smb1ops.c | |
parent | 1feeaac753e0a9b3864740556b7840643642abdb (diff) |
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: | |||
836 | return rc; | 836 | return rc; |
837 | } | 837 | } |
838 | 838 | ||
839 | static int | ||
840 | cifs_query_dir_first(const unsigned int xid, struct cifs_tcon *tcon, | ||
841 | const char *path, struct cifs_sb_info *cifs_sb, | ||
842 | struct cifs_fid *fid, __u16 search_flags, | ||
843 | struct cifs_search_info *srch_inf) | ||
844 | { | ||
845 | return CIFSFindFirst(xid, tcon, path, cifs_sb->local_nls, | ||
846 | &fid->netfid, search_flags, srch_inf, | ||
847 | cifs_sb->mnt_cifs_flags & | ||
848 | CIFS_MOUNT_MAP_SPECIAL_CHR, CIFS_DIR_SEP(cifs_sb)); | ||
849 | } | ||
850 | |||
851 | static int | ||
852 | cifs_query_dir_next(const unsigned int xid, struct cifs_tcon *tcon, | ||
853 | struct cifs_fid *fid, __u16 search_flags, | ||
854 | struct cifs_search_info *srch_inf) | ||
855 | { | ||
856 | return CIFSFindNext(xid, tcon, fid->netfid, search_flags, srch_inf); | ||
857 | } | ||
858 | |||
859 | static int | ||
860 | cifs_close_dir(const unsigned int xid, struct cifs_tcon *tcon, | ||
861 | struct cifs_fid *fid) | ||
862 | { | ||
863 | return CIFSFindClose(xid, tcon, fid->netfid); | ||
864 | } | ||
865 | |||
839 | struct smb_version_operations smb1_operations = { | 866 | struct smb_version_operations smb1_operations = { |
840 | .send_cancel = send_nt_cancel, | 867 | .send_cancel = send_nt_cancel, |
841 | .compare_fids = cifs_compare_fids, | 868 | .compare_fids = cifs_compare_fids, |
@@ -891,6 +918,10 @@ struct smb_version_operations smb1_operations = { | |||
891 | .async_writev = cifs_async_writev, | 918 | .async_writev = cifs_async_writev, |
892 | .sync_read = cifs_sync_read, | 919 | .sync_read = cifs_sync_read, |
893 | .sync_write = cifs_sync_write, | 920 | .sync_write = cifs_sync_write, |
921 | .query_dir_first = cifs_query_dir_first, | ||
922 | .query_dir_next = cifs_query_dir_next, | ||
923 | .close_dir = cifs_close_dir, | ||
924 | .calc_smb_size = smbCalcSize, | ||
894 | }; | 925 | }; |
895 | 926 | ||
896 | struct smb_version_values smb1_values = { | 927 | struct smb_version_values smb1_values = { |