Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174708
b: refs/heads/master
c: 49fa7a5
h: refs/heads/master
v: v3
  • Loading branch information
Ryusuke Konishi committed Nov 20, 2009
1 parent 309c9f3 commit 9fc53fe
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c3ea56c80081b826df4a0ac797432179cf5b7cd2
refs/heads/master: 49fa7a590208b439cc74f2cafdb15568abb3f8d1
16 changes: 15 additions & 1 deletion trunk/fs/nilfs2/ifile.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@
#include "alloc.h"
#include "ifile.h"


struct nilfs_ifile_info {
struct nilfs_mdt_info mi;
struct nilfs_palloc_cache palloc_cache;
};

static inline struct nilfs_ifile_info *NILFS_IFILE_I(struct inode *ifile)
{
return (struct nilfs_ifile_info *)NILFS_MDT(ifile);
}

/**
* nilfs_ifile_create_inode - create a new disk inode
* @ifile: ifile inode
Expand Down Expand Up @@ -159,13 +170,16 @@ struct inode *nilfs_ifile_new(struct nilfs_sb_info *sbi, size_t inode_size)
struct inode *ifile;
int err;

ifile = nilfs_mdt_new(sbi->s_nilfs, sbi->s_super, NILFS_IFILE_INO, 0);
ifile = nilfs_mdt_new(sbi->s_nilfs, sbi->s_super, NILFS_IFILE_INO,
sizeof(struct nilfs_ifile_info));
if (ifile) {
err = nilfs_palloc_init_blockgroup(ifile, inode_size);
if (unlikely(err)) {
nilfs_mdt_destroy(ifile);
return NULL;
}
nilfs_palloc_setup_cache(ifile,
&NILFS_IFILE_I(ifile)->palloc_cache);
}
return ifile;
}

0 comments on commit 9fc53fe

Please sign in to comment.