diff options
Diffstat (limited to 'fs/fscache/internal.h')
-rw-r--r-- | fs/fscache/internal.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/fs/fscache/internal.h b/fs/fscache/internal.h index 014a830c8b3..e0cbd16f6dc 100644 --- a/fs/fscache/internal.h +++ b/fs/fscache/internal.h @@ -229,6 +229,27 @@ static inline void fscache_cookie_put(struct fscache_cookie *cookie) __fscache_cookie_put(cookie); } +/* + * get an extra reference to a netfs retrieval context + */ +static inline +void *fscache_get_context(struct fscache_cookie *cookie, void *context) +{ + if (cookie->def->get_context) + cookie->def->get_context(cookie->netfs_data, context); + return context; +} + +/* + * release a reference to a netfs retrieval context + */ +static inline +void fscache_put_context(struct fscache_cookie *cookie, void *context) +{ + if (cookie->def->put_context) + cookie->def->put_context(cookie->netfs_data, context); +} + /*****************************************************************************/ /* * debug tracing |