#ifndef _CIFS_FSCACHE_H
#define _CIFS_FSCACHE_H
#include <linux/swap.h>
#include <linux/fscache.h>
#include "cifsglob.h"
struct cifs_fscache_volume_coherency_data { … } __packed;
struct cifs_fscache_inode_coherency_data { … };
#ifdef CONFIG_CIFS_FSCACHE
extern int cifs_fscache_get_super_cookie(struct cifs_tcon *);
extern void cifs_fscache_release_super_cookie(struct cifs_tcon *);
extern void cifs_fscache_get_inode_cookie(struct inode *inode);
extern void cifs_fscache_release_inode_cookie(struct inode *);
extern void cifs_fscache_unuse_inode_cookie(struct inode *inode, bool update);
static inline
void cifs_fscache_fill_coherency(struct inode *inode,
struct cifs_fscache_inode_coherency_data *cd)
{ … }
static inline struct fscache_cookie *cifs_inode_cookie(struct inode *inode)
{ … }
static inline void cifs_invalidate_cache(struct inode *inode, unsigned int flags)
{ … }
static inline bool cifs_fscache_enabled(struct inode *inode)
{ … }
#else
static inline
void cifs_fscache_fill_coherency(struct inode *inode,
struct cifs_fscache_inode_coherency_data *cd)
{
}
static inline int cifs_fscache_get_super_cookie(struct cifs_tcon *tcon) { return 0; }
static inline void cifs_fscache_release_super_cookie(struct cifs_tcon *tcon) {}
static inline void cifs_fscache_get_inode_cookie(struct inode *inode) {}
static inline void cifs_fscache_release_inode_cookie(struct inode *inode) {}
static inline void cifs_fscache_unuse_inode_cookie(struct inode *inode, bool update) {}
static inline struct fscache_cookie *cifs_inode_cookie(struct inode *inode) { return NULL; }
static inline void cifs_invalidate_cache(struct inode *inode, unsigned int flags) {}
static inline bool cifs_fscache_enabled(struct inode *inode) { return false; }
#endif
#endif