fscache: Move fscache_cookies_seq_ops specific code under CONFIG_PROC_FS
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 35 lines · Yue Hu
fscache_cookies_seq_opsis only used inproc.cthat is compiled under enabledCONFIG_PROC_FS, so move related code under this config. The same case exsits ininternal.h.Also, make
fscache_lru_cookie_timeoutstatic due to no user outside ofcookie.c.Signed-off-by Yue Hu <[email protected]>--- fs/fscache/cookie.c | 4 +++- fs/fscache/internal.h | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-)fs/fscache/cookie.c +2
-1@@ -30,7 +30,7 @@ static DEFINE_SPINLOCK(fscache_cookie_lru_lock);DEFINE_TIMER (fscache_cookie_lru_timer, fscache_cookie_lru_timed_out); static DECLARE_WORK(fscache_cookie_lru_work, fscache_cookie_lru_worker);static const char fscache_cookie_states[FSCACHE_COOKIE_STATE__NR ] ="-LCAIFUWRD" ; -unsigned int fscache_lru_cookie_timeout =10 *HZ ; +static unsigned int fscache_lru_cookie_timeout =10 *HZ ;void fscache_print_cookie (struct fscache_cookie *cookie,char prefix) {@@ -1069,6 +1069,7 @@ void __fscache_invalidate(struct fscache_cookie *cookie, }EXPORT_SYMBOL (__fscache_invalidate); +#ifdef CONFIG_PROC_FS /* * Generate a list of extant cookies in /proc/fs/fscache/cookies */
fs/fscache/cookie.c const struct seq_operations fscache_cookies_seq_ops = { · line 1149
Quoted 4 lines
fs/fscache/cookie.c +1
-0@@ -1145,3 +1146,4 @@ const struct seq_operations fscache_cookies_seq_ops = { .stop = fscache_cookies_seq_stop, .show = fscache_cookies_seq_show, }; +#endif
Then I'm afraid fscache_cookies_seq_stop() and fscache_cookies_seq_show() also need to be wrapped with "#ifdef CONFIG_PROC_F" ...
Signature · 2 lines
Thanks, Jeffle
Quoted 33 lines · JeffleXu
Quoted 30 lines · Yue Hu
fscache_cookies_seq_opsis only used inproc.cthat is compiled under enabledCONFIG_PROC_FS, so move related code under this config. The same case exsits ininternal.h.Also, make
fscache_lru_cookie_timeoutstatic due to no user outside ofcookie.c.Signed-off-by Yue Hu <[email protected]>--- fs/fscache/cookie.c | 4 +++- fs/fscache/internal.h | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-)fs/fscache/cookie.c +1
-1@@ -30,7 +30,7 @@ static DEFINE_SPINLOCK(fscache_cookie_lru_lock);DEFINE_TIMER (fscache_cookie_lru_timer, fscache_cookie_lru_timed_out); static DECLARE_WORK(fscache_cookie_lru_work, fscache_cookie_lru_worker);static const char fscache_cookie_states[FSCACHE_COOKIE_STATE__NR ] ="-LCAIFUWRD" ; -unsigned int fscache_lru_cookie_timeout =10 *HZ ; +static unsigned int fscache_lru_cookie_timeout =10 *HZ ;void fscache_print_cookie (struct fscache_cookie *cookie,char prefix) {@@ -1069,6 +1069,7 @@ void __fscache_invalidate(struct fscache_cookie *cookie, }EXPORT_SYMBOL (__fscache_invalidate);
Quoted 14 lines
fs/fscache/cookie.c const struct seq_operations fscache_cookies_seq_ops = { · line 1149
Quoted 9 lines
fs/fscache/cookie.c +2
-0+#ifdef CONFIG_PROC_FS /* * Generate a list of extant cookies in /proc/fs/fscache/cookies */ @@ -1145,3 +1146,4 @@ const struct seq_operations fscache_cookies_seq_ops = { .stop = fscache_cookies_seq_stop, .show = fscache_cookies_seq_show, }; +#endif Then I'm afraid
fscache_cookies_seq_stop()andfscache_cookies_seq_show()also need to be wrapped with "#ifdefCONFIG_PROC_F" ...
Sorry, fscache_cookies_seq_stop() and fscache_cookies_seq_show() have already been wrapped with "#ifdef CONFIG_PROC_F" in this patch. Please ignore the noise...
Signature · 2 lines
Thanks, Jeffle