summaryrefslogtreecommitdiff
path: root/firmware/include/dircache_redirect.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/include/dircache_redirect.h')
-rw-r--r--firmware/include/dircache_redirect.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/firmware/include/dircache_redirect.h b/firmware/include/dircache_redirect.h
index 15fb4bc38d..9fae16b551 100644
--- a/firmware/include/dircache_redirect.h
+++ b/firmware/include/dircache_redirect.h
@@ -24,6 +24,8 @@
24 24
25/*** 25/***
26 ** Internal redirects that depend upon whether or not dircache is made 26 ** Internal redirects that depend upon whether or not dircache is made
27 **
28 ** Some stuff deals with it, some doesn't right now. This is a nexus point..
27 **/ 29 **/
28 30
29/** File binding **/ 31/** File binding **/
@@ -119,11 +121,6 @@ static inline void fileop_onsync_internal(struct filestr_base *stream)
119#endif 121#endif
120} 122}
121 123
122static inline void fileop_ontruncate_internal(struct filestr_base *stream)
123{
124 fileobj_fileop_truncate(stream);
125}
126
127static inline void volume_onmount_internal(IF_MV_NONVOID(int volume)) 124static inline void volume_onmount_internal(IF_MV_NONVOID(int volume))
128{ 125{
129#ifdef HAVE_DIRCACHE 126#ifdef HAVE_DIRCACHE
@@ -134,10 +131,20 @@ static inline void volume_onmount_internal(IF_MV_NONVOID(int volume))
134 131
135static inline void volume_onunmount_internal(IF_MV_NONVOID(int volume)) 132static inline void volume_onunmount_internal(IF_MV_NONVOID(int volume))
136{ 133{
137 fileobj_mgr_unmount(IF_MV(volume));
138#ifdef HAVE_DIRCACHE 134#ifdef HAVE_DIRCACHE
135 /* First, to avoid update of something about to be destroyed anyway */
139 dircache_unmount(IF_MV(volume)); 136 dircache_unmount(IF_MV(volume));
140#endif 137#endif
138 fileobj_mgr_unmount(IF_MV(volume));
139}
140
141static inline void fileop_onunmount_internal(struct filestr_base *stream)
142{
143
144 if (stream->flags & FD_WRITE)
145 force_close_writer_internal(stream); /* try to save stuff */
146 else
147 fileop_onclose_internal(stream); /* just readers, bye */
141} 148}
142 149
143 150