aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/gcinode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nilfs2/gcinode.c')
-rw-r--r--fs/nilfs2/gcinode.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/nilfs2/gcinode.c b/fs/nilfs2/gcinode.c
index e6de0a27ab5d..145f03cd7d3e 100644
--- a/fs/nilfs2/gcinode.c
+++ b/fs/nilfs2/gcinode.c
@@ -28,10 +28,10 @@
28 * gcinodes), and this file provides lookup function of the dummy 28 * gcinodes), and this file provides lookup function of the dummy
29 * inodes and their buffer read function. 29 * inodes and their buffer read function.
30 * 30 *
31 * Since NILFS2 keeps up multiple checkpoints/snapshots accross GC, it 31 * Since NILFS2 keeps up multiple checkpoints/snapshots across GC, it
32 * has to treat blocks that belong to a same file but have different 32 * has to treat blocks that belong to a same file but have different
33 * checkpoint numbers. To avoid interference among generations, dummy 33 * checkpoint numbers. To avoid interference among generations, dummy
34 * inodes are managed separatly from actual inodes, and their lookup 34 * inodes are managed separately from actual inodes, and their lookup
35 * function (nilfs_gc_iget) is designed to be specified with a 35 * function (nilfs_gc_iget) is designed to be specified with a
36 * checkpoint number argument as well as an inode number. 36 * checkpoint number argument as well as an inode number.
37 * 37 *
@@ -45,6 +45,7 @@
45#include <linux/buffer_head.h> 45#include <linux/buffer_head.h>
46#include <linux/mpage.h> 46#include <linux/mpage.h>
47#include <linux/hash.h> 47#include <linux/hash.h>
48#include <linux/slab.h>
48#include <linux/swap.h> 49#include <linux/swap.h>
49#include "nilfs.h" 50#include "nilfs.h"
50#include "page.h" 51#include "page.h"
@@ -149,7 +150,7 @@ int nilfs_gccache_submit_read_node(struct inode *inode, sector_t pbn,
149 __u64 vbn, struct buffer_head **out_bh) 150 __u64 vbn, struct buffer_head **out_bh)
150{ 151{
151 int ret = nilfs_btnode_submit_block(&NILFS_I(inode)->i_btnode_cache, 152 int ret = nilfs_btnode_submit_block(&NILFS_I(inode)->i_btnode_cache,
152 vbn ? : pbn, pbn, out_bh, 0); 153 vbn ? : pbn, pbn, out_bh);
153 if (ret == -EEXIST) /* internal code (cache hit) */ 154 if (ret == -EEXIST) /* internal code (cache hit) */
154 ret = 0; 155 ret = 0;
155 return ret; 156 return ret;
@@ -212,9 +213,10 @@ void nilfs_destroy_gccache(struct the_nilfs *nilfs)
212static struct inode *alloc_gcinode(struct the_nilfs *nilfs, ino_t ino, 213static struct inode *alloc_gcinode(struct the_nilfs *nilfs, ino_t ino,
213 __u64 cno) 214 __u64 cno)
214{ 215{
215 struct inode *inode = nilfs_mdt_new_common(nilfs, NULL, ino, GFP_NOFS); 216 struct inode *inode;
216 struct nilfs_inode_info *ii; 217 struct nilfs_inode_info *ii;
217 218
219 inode = nilfs_mdt_new_common(nilfs, NULL, ino, GFP_NOFS, 0);
218 if (!inode) 220 if (!inode)
219 return NULL; 221 return NULL;
220 222
@@ -265,7 +267,6 @@ struct inode *nilfs_gc_iget(struct the_nilfs *nilfs, ino_t ino, __u64 cno)
265 */ 267 */
266void nilfs_clear_gcinode(struct inode *inode) 268void nilfs_clear_gcinode(struct inode *inode)
267{ 269{
268 nilfs_mdt_clear(inode);
269 nilfs_mdt_destroy(inode); 270 nilfs_mdt_destroy(inode);
270} 271}
271 272