aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ncpfs/ncplib_kernel.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ncpfs/ncplib_kernel.h')
-rw-r--r--fs/ncpfs/ncplib_kernel.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/ncpfs/ncplib_kernel.h b/fs/ncpfs/ncplib_kernel.h
index 2441d1ab57dc..3c57eca634ce 100644
--- a/fs/ncpfs/ncplib_kernel.h
+++ b/fs/ncpfs/ncplib_kernel.h
@@ -65,10 +65,11 @@ static inline void ncp_inode_close(struct inode *inode) {
65 atomic_dec(&NCP_FINFO(inode)->opened); 65 atomic_dec(&NCP_FINFO(inode)->opened);
66} 66}
67 67
68void ncp_extract_file_info(void* src, struct nw_info_struct* target); 68void ncp_extract_file_info(const void* src, struct nw_info_struct* target);
69int ncp_obtain_info(struct ncp_server *server, struct inode *, char *, 69int ncp_obtain_info(struct ncp_server *server, struct inode *, const char *,
70 struct nw_info_struct *target); 70 struct nw_info_struct *target);
71int ncp_obtain_nfs_info(struct ncp_server *server, struct nw_info_struct *target); 71int ncp_obtain_nfs_info(struct ncp_server *server, struct nw_info_struct *target);
72int ncp_update_known_namespace(struct ncp_server *server, __u8 volume, int *ret_ns);
72int ncp_get_volume_root(struct ncp_server *server, const char *volname, 73int ncp_get_volume_root(struct ncp_server *server, const char *volname,
73 __u32 *volume, __le32 *dirent, __le32 *dosdirent); 74 __u32 *volume, __le32 *dirent, __le32 *dosdirent);
74int ncp_lookup_volume(struct ncp_server *, const char *, struct nw_info_struct *); 75int ncp_lookup_volume(struct ncp_server *, const char *, struct nw_info_struct *);
@@ -80,8 +81,8 @@ int ncp_modify_nfs_info(struct ncp_server *, __u8 volnum, __le32 dirent,
80 __u32 mode, __u32 rdev); 81 __u32 mode, __u32 rdev);
81 82
82int ncp_del_file_or_subdir2(struct ncp_server *, struct dentry*); 83int ncp_del_file_or_subdir2(struct ncp_server *, struct dentry*);
83int ncp_del_file_or_subdir(struct ncp_server *, struct inode *, char *); 84int ncp_del_file_or_subdir(struct ncp_server *, struct inode *, const char *);
84int ncp_open_create_file_or_subdir(struct ncp_server *, struct inode *, char *, 85int ncp_open_create_file_or_subdir(struct ncp_server *, struct inode *, const char *,
85 int, __le32, __le16, struct ncp_entry_info *); 86 int, __le32, __le16, struct ncp_entry_info *);
86 87
87int ncp_initialize_search(struct ncp_server *, struct inode *, 88int ncp_initialize_search(struct ncp_server *, struct inode *,
@@ -93,7 +94,7 @@ int ncp_search_for_fileset(struct ncp_server *server,
93 char** rbuf, size_t* rsize); 94 char** rbuf, size_t* rsize);
94 95
95int ncp_ren_or_mov_file_or_subdir(struct ncp_server *server, 96int ncp_ren_or_mov_file_or_subdir(struct ncp_server *server,
96 struct inode *, char *, struct inode *, char *); 97 struct inode *, const char *, struct inode *, const char *);
97 98
98 99
99int 100int
@@ -170,13 +171,13 @@ static inline int ncp_strnicmp(struct nls_table *t, const unsigned char *s1,
170#endif /* CONFIG_NCPFS_NLS */ 171#endif /* CONFIG_NCPFS_NLS */
171 172
172#define NCP_GET_AGE(dentry) (jiffies - (dentry)->d_time) 173#define NCP_GET_AGE(dentry) (jiffies - (dentry)->d_time)
173#define NCP_MAX_AGE(server) ((server)->dentry_ttl) 174#define NCP_MAX_AGE(server) atomic_read(&(server)->dentry_ttl)
174#define NCP_TEST_AGE(server,dentry) (NCP_GET_AGE(dentry) < NCP_MAX_AGE(server)) 175#define NCP_TEST_AGE(server,dentry) (NCP_GET_AGE(dentry) < NCP_MAX_AGE(server))
175 176
176static inline void 177static inline void
177ncp_age_dentry(struct ncp_server* server, struct dentry* dentry) 178ncp_age_dentry(struct ncp_server* server, struct dentry* dentry)
178{ 179{
179 dentry->d_time = jiffies - server->dentry_ttl; 180 dentry->d_time = jiffies - NCP_MAX_AGE(server);
180} 181}
181 182
182static inline void 183static inline void