diff options
Diffstat (limited to 'fs/nilfs2/cpfile.c')
-rw-r--r-- | fs/nilfs2/cpfile.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/nilfs2/cpfile.c b/fs/nilfs2/cpfile.c index 3f5d5d06f53..2aaefaec156 100644 --- a/fs/nilfs2/cpfile.c +++ b/fs/nilfs2/cpfile.c | |||
@@ -926,3 +926,19 @@ int nilfs_cpfile_get_stat(struct inode *cpfile, struct nilfs_cpstat *cpstat) | |||
926 | up_read(&NILFS_MDT(cpfile)->mi_sem); | 926 | up_read(&NILFS_MDT(cpfile)->mi_sem); |
927 | return ret; | 927 | return ret; |
928 | } | 928 | } |
929 | |||
930 | /** | ||
931 | * nilfs_cpfile_new - create cpfile | ||
932 | * @nilfs: nilfs object | ||
933 | * @cpsize: size of a checkpoint entry | ||
934 | */ | ||
935 | struct inode *nilfs_cpfile_new(struct the_nilfs *nilfs, size_t cpsize) | ||
936 | { | ||
937 | struct inode *cpfile; | ||
938 | |||
939 | cpfile = nilfs_mdt_new(nilfs, NULL, NILFS_CPFILE_INO, 0); | ||
940 | if (cpfile) | ||
941 | nilfs_mdt_set_entry_size(cpfile, cpsize, | ||
942 | sizeof(struct nilfs_cpfile_header)); | ||
943 | return cpfile; | ||
944 | } | ||