diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-09-17 08:07:11 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-10-24 23:34:47 -0400 |
commit | ceaec15d49f29de1f8864e31ff4007c34b031bff (patch) | |
tree | 1041f5725f6d4a3381068122abb8822705a1bc95 /fs/9p | |
parent | d0e639c9e06d44e713170031fe05fb60ebe680af (diff) |
9p: make v9fs_cache_inode_{get,put,set}_cookie empty inlines for !9P_CACHEFS
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/9p')
-rw-r--r-- | fs/9p/cache.h | 12 | ||||
-rw-r--r-- | fs/9p/vfs_file.c | 2 | ||||
-rw-r--r-- | fs/9p/vfs_inode.c | 6 | ||||
-rw-r--r-- | fs/9p/vfs_inode_dotl.c | 4 |
4 files changed, 12 insertions, 12 deletions
diff --git a/fs/9p/cache.h b/fs/9p/cache.h index 40cc54ced5d9..2f9675491095 100644 --- a/fs/9p/cache.h +++ b/fs/9p/cache.h | |||
@@ -101,6 +101,18 @@ static inline void v9fs_fscache_wait_on_page_write(struct inode *inode, | |||
101 | 101 | ||
102 | #else /* CONFIG_9P_FSCACHE */ | 102 | #else /* CONFIG_9P_FSCACHE */ |
103 | 103 | ||
104 | static inline void v9fs_cache_inode_get_cookie(struct inode *inode) | ||
105 | { | ||
106 | } | ||
107 | |||
108 | static inline void v9fs_cache_inode_put_cookie(struct inode *inode) | ||
109 | { | ||
110 | } | ||
111 | |||
112 | static inline void v9fs_cache_inode_set_cookie(struct inode *inode, struct file *file) | ||
113 | { | ||
114 | } | ||
115 | |||
104 | static inline int v9fs_fscache_release_page(struct page *page, | 116 | static inline int v9fs_fscache_release_page(struct page *page, |
105 | gfp_t gfp) { | 117 | gfp_t gfp) { |
106 | return 1; | 118 | return 1; |
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index aa5ecf479a57..a0df3e73c2b1 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c | |||
@@ -105,10 +105,8 @@ int v9fs_file_open(struct inode *inode, struct file *file) | |||
105 | v9inode->writeback_fid = (void *) fid; | 105 | v9inode->writeback_fid = (void *) fid; |
106 | } | 106 | } |
107 | mutex_unlock(&v9inode->v_mutex); | 107 | mutex_unlock(&v9inode->v_mutex); |
108 | #ifdef CONFIG_9P_FSCACHE | ||
109 | if (v9ses->cache) | 108 | if (v9ses->cache) |
110 | v9fs_cache_inode_set_cookie(inode, file); | 109 | v9fs_cache_inode_set_cookie(inode, file); |
111 | #endif | ||
112 | return 0; | 110 | return 0; |
113 | out_error: | 111 | out_error: |
114 | p9_client_clunk(file->private_data); | 112 | p9_client_clunk(file->private_data); |
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 94de6d1482e2..4e65aa903345 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c | |||
@@ -448,9 +448,7 @@ void v9fs_evict_inode(struct inode *inode) | |||
448 | clear_inode(inode); | 448 | clear_inode(inode); |
449 | filemap_fdatawrite(inode->i_mapping); | 449 | filemap_fdatawrite(inode->i_mapping); |
450 | 450 | ||
451 | #ifdef CONFIG_9P_FSCACHE | ||
452 | v9fs_cache_inode_put_cookie(inode); | 451 | v9fs_cache_inode_put_cookie(inode); |
453 | #endif | ||
454 | /* clunk the fid stashed in writeback_fid */ | 452 | /* clunk the fid stashed in writeback_fid */ |
455 | if (v9inode->writeback_fid) { | 453 | if (v9inode->writeback_fid) { |
456 | p9_client_clunk(v9inode->writeback_fid); | 454 | p9_client_clunk(v9inode->writeback_fid); |
@@ -531,9 +529,7 @@ static struct inode *v9fs_qid_iget(struct super_block *sb, | |||
531 | goto error; | 529 | goto error; |
532 | 530 | ||
533 | v9fs_stat2inode(st, inode, sb); | 531 | v9fs_stat2inode(st, inode, sb); |
534 | #ifdef CONFIG_9P_FSCACHE | ||
535 | v9fs_cache_inode_get_cookie(inode); | 532 | v9fs_cache_inode_get_cookie(inode); |
536 | #endif | ||
537 | unlock_new_inode(inode); | 533 | unlock_new_inode(inode); |
538 | return inode; | 534 | return inode; |
539 | error: | 535 | error: |
@@ -905,10 +901,8 @@ v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry, | |||
905 | goto error; | 901 | goto error; |
906 | 902 | ||
907 | file->private_data = fid; | 903 | file->private_data = fid; |
908 | #ifdef CONFIG_9P_FSCACHE | ||
909 | if (v9ses->cache) | 904 | if (v9ses->cache) |
910 | v9fs_cache_inode_set_cookie(dentry->d_inode, file); | 905 | v9fs_cache_inode_set_cookie(dentry->d_inode, file); |
911 | #endif | ||
912 | 906 | ||
913 | *opened |= FILE_CREATED; | 907 | *opened |= FILE_CREATED; |
914 | out: | 908 | out: |
diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c index a7c481402c46..4c10edec26a0 100644 --- a/fs/9p/vfs_inode_dotl.c +++ b/fs/9p/vfs_inode_dotl.c | |||
@@ -141,9 +141,7 @@ static struct inode *v9fs_qid_iget_dotl(struct super_block *sb, | |||
141 | goto error; | 141 | goto error; |
142 | 142 | ||
143 | v9fs_stat2inode_dotl(st, inode); | 143 | v9fs_stat2inode_dotl(st, inode); |
144 | #ifdef CONFIG_9P_FSCACHE | ||
145 | v9fs_cache_inode_get_cookie(inode); | 144 | v9fs_cache_inode_get_cookie(inode); |
146 | #endif | ||
147 | retval = v9fs_get_acl(inode, fid); | 145 | retval = v9fs_get_acl(inode, fid); |
148 | if (retval) | 146 | if (retval) |
149 | goto error; | 147 | goto error; |
@@ -355,10 +353,8 @@ v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry, | |||
355 | if (err) | 353 | if (err) |
356 | goto err_clunk_old_fid; | 354 | goto err_clunk_old_fid; |
357 | file->private_data = ofid; | 355 | file->private_data = ofid; |
358 | #ifdef CONFIG_9P_FSCACHE | ||
359 | if (v9ses->cache) | 356 | if (v9ses->cache) |
360 | v9fs_cache_inode_set_cookie(inode, file); | 357 | v9fs_cache_inode_set_cookie(inode, file); |
361 | #endif | ||
362 | *opened |= FILE_CREATED; | 358 | *opened |= FILE_CREATED; |
363 | out: | 359 | out: |
364 | v9fs_put_acl(dacl, pacl); | 360 | v9fs_put_acl(dacl, pacl); |