File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -304,13 +304,13 @@ static int orangefs_dir_iterate(struct file *file,
304
304
* Must read more if the user has sought past what has been read
305
305
* so far. Stop a user who has sought past the end.
306
306
*/
307
- while (od -> token != ORANGEFS_READDIR_END &&
307
+ while (od -> token != ORANGEFS_ITERATE_END &&
308
308
ctx -> pos > od -> end ) {
309
309
r = orangefs_dir_more (oi , od , dentry );
310
310
if (r )
311
311
return r ;
312
312
}
313
- if (od -> token == ORANGEFS_READDIR_END && ctx -> pos > od -> end )
313
+ if (od -> token == ORANGEFS_ITERATE_END && ctx -> pos > od -> end )
314
314
return - EIO ;
315
315
316
316
/* Then try to fill if there's any left in the buffer. */
@@ -321,7 +321,7 @@ static int orangefs_dir_iterate(struct file *file,
321
321
}
322
322
323
323
/* Finally get some more and try to fill. */
324
- if (od -> token != ORANGEFS_READDIR_END ) {
324
+ if (od -> token != ORANGEFS_ITERATE_END ) {
325
325
r = orangefs_dir_more (oi , od , dentry );
326
326
if (r )
327
327
return r ;
@@ -339,7 +339,7 @@ static int orangefs_dir_open(struct inode *inode, struct file *file)
339
339
if (!file -> private_data )
340
340
return - ENOMEM ;
341
341
od = file -> private_data ;
342
- od -> token = ORANGEFS_READDIR_START ;
342
+ od -> token = ORANGEFS_ITERATE_START ;
343
343
od -> part = NULL ;
344
344
od -> end = 1 << PART_SHIFT ;
345
345
od -> error = 0 ;
Original file line number Diff line number Diff line change @@ -138,13 +138,8 @@ typedef __s64 ORANGEFS_offset;
138
138
#define ORANGEFS_G_SGID (1 << 10)
139
139
#define ORANGEFS_U_SUID (1 << 11)
140
140
141
- /* definition taken from stdint.h */
142
- #define INT32_MAX (2147483647)
143
- #define ORANGEFS_ITERATE_START (INT32_MAX - 1)
144
- #define ORANGEFS_ITERATE_END (INT32_MAX - 2)
145
- #define ORANGEFS_ITERATE_NEXT (INT32_MAX - 3)
146
- #define ORANGEFS_READDIR_START ORANGEFS_ITERATE_START
147
- #define ORANGEFS_READDIR_END ORANGEFS_ITERATE_END
141
+ #define ORANGEFS_ITERATE_START 2147483646
142
+ #define ORANGEFS_ITERATE_END 2147483645
148
143
#define ORANGEFS_IMMUTABLE_FL FS_IMMUTABLE_FL
149
144
#define ORANGEFS_APPEND_FL FS_APPEND_FL
150
145
#define ORANGEFS_NOATIME_FL FS_NOATIME_FL
You can’t perform that action at this time.
0 commit comments