Skip to content

Commit 4eb11a3

Browse files
bharathsm-mssmfrench
authored andcommitted
smb: Use loff_t for directory position in cached_dirents
Change the pos field in struct cached_dirents from int to loff_t to support large directory offsets. This avoids overflow and matches kernel conventions for directory positions. Reviewed-by: Paulo Alcantara (Red Hat) <[email protected]> Signed-off-by: Bharath SM <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent a218274 commit 4eb11a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/smb/client/cached_dir.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ struct cached_dirents {
2626
* open file instance.
2727
*/
2828
struct mutex de_mutex;
29-
int pos; /* Expected ctx->pos */
29+
loff_t pos; /* Expected ctx->pos */
3030
struct list_head entries;
3131
};
3232

0 commit comments

Comments
 (0)