@@ -36,10 +36,10 @@ struct cached_fid {
3636 struct list_head entry ;
3737 struct cached_fids * cfids ;
3838 const char * path ;
39- bool has_lease : 1 ;
40- bool is_open : 1 ;
41- bool on_list : 1 ;
42- bool file_all_info_is_valid : 1 ;
39+ bool has_lease ;
40+ bool is_open ;
41+ bool on_list ;
42+ bool file_all_info_is_valid ;
4343 unsigned long time ; /* jiffies of when lease was taken */
4444 unsigned long last_access_time ; /* jiffies of when last accessed */
4545 struct kref refcount ;
@@ -48,8 +48,10 @@ struct cached_fid {
4848 struct dentry * dentry ;
4949 struct work_struct put_work ;
5050 struct work_struct close_work ;
51- struct smb2_file_all_info file_all_info ;
5251 struct cached_dirents dirents ;
52+
53+ /* Must be last as it ends in a flexible-array member. */
54+ struct smb2_file_all_info file_all_info ;
5355};
5456
5557/* default MAX_CACHED_FIDS is 16 */
@@ -77,22 +79,18 @@ is_valid_cached_dir(struct cached_fid *cfid)
7779 return cfid -> time && cfid -> has_lease ;
7880}
7981
80- extern struct cached_fids * init_cached_dirs (void );
81- extern void free_cached_dirs (struct cached_fids * cfids );
82- extern int open_cached_dir (unsigned int xid , struct cifs_tcon * tcon ,
83- const char * path ,
84- struct cifs_sb_info * cifs_sb ,
85- bool lookup_only , struct cached_fid * * cfid );
86- extern int open_cached_dir_by_dentry (struct cifs_tcon * tcon ,
87- struct dentry * dentry ,
88- struct cached_fid * * cfid );
89- extern void close_cached_dir (struct cached_fid * cfid );
90- extern void drop_cached_dir_by_name (const unsigned int xid ,
91- struct cifs_tcon * tcon ,
92- const char * name ,
93- struct cifs_sb_info * cifs_sb );
94- extern void close_all_cached_dirs (struct cifs_sb_info * cifs_sb );
95- extern void invalidate_all_cached_dirs (struct cifs_tcon * tcon );
96- extern bool cached_dir_lease_break (struct cifs_tcon * tcon , __u8 lease_key [16 ]);
82+ struct cached_fids * init_cached_dirs (void );
83+ void free_cached_dirs (struct cached_fids * cfids );
84+ int open_cached_dir (unsigned int xid , struct cifs_tcon * tcon , const char * path ,
85+ struct cifs_sb_info * cifs_sb , bool lookup_only ,
86+ struct cached_fid * * ret_cfid );
87+ int open_cached_dir_by_dentry (struct cifs_tcon * tcon , struct dentry * dentry ,
88+ struct cached_fid * * ret_cfid );
89+ void close_cached_dir (struct cached_fid * cfid );
90+ void drop_cached_dir_by_name (const unsigned int xid , struct cifs_tcon * tcon ,
91+ const char * name , struct cifs_sb_info * cifs_sb );
92+ void close_all_cached_dirs (struct cifs_sb_info * cifs_sb );
93+ void invalidate_all_cached_dirs (struct cifs_tcon * tcon );
94+ bool cached_dir_lease_break (struct cifs_tcon * tcon , __u8 lease_key [16 ]);
9795
9896#endif /* _CACHED_DIR_H */
0 commit comments