Commit c5cb4d1
Ronnie Sahlberg
cifs: fix skipping to incorrect offset in emit_cached_dirents
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2151418
commit 780614c
When application has done lseek() to a different offset on a directory fd
we skipped one entry too many before we start emitting directory entries
from the cache.
We need to also make sure that when we are starting to emit directory
entries from the cache, the ->pos sequence might have holes and skip
some indices.
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Reviewed-by: Tom Talpey <tom@talpey.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
(cherry picked from commit 780614c)
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>1 parent 4a14498 commit c5cb4d1
1 file changed
+23
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
844 | 844 | | |
845 | 845 | | |
846 | 846 | | |
847 | | - | |
| 847 | + | |
848 | 848 | | |
849 | 849 | | |
850 | | - | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
851 | 855 | | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
852 | 868 | | |
853 | 869 | | |
854 | 870 | | |
855 | 871 | | |
856 | 872 | | |
857 | 873 | | |
| 874 | + | |
858 | 875 | | |
859 | 876 | | |
860 | 877 | | |
| |||
1202 | 1219 | | |
1203 | 1220 | | |
1204 | 1221 | | |
1205 | | - | |
1206 | | - | |
1207 | | - | |
1208 | | - | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
1209 | 1226 | | |
1210 | 1227 | | |
1211 | 1228 | | |
| |||
0 commit comments