diff options
| author | Takashi Iwai <tiwai@suse.de> | 2009-12-15 04:29:06 -0500 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2009-12-15 04:29:06 -0500 |
| commit | 709334c87dbdb44150ce436b3d13c814db0dcae9 (patch) | |
| tree | 5861a45f70c1f283720337abd864498f5afb3dbe /fs/nilfs2/cpfile.c | |
| parent | 0d64b568fcd48b133721c1d322e7c51d85eb12df (diff) | |
| parent | f74890277a196949e4004fe2955e1d4fb3930f98 (diff) | |
Merge branch 'fixes' of git://git.alsa-project.org/alsa-kernel into for-linus
Diffstat (limited to 'fs/nilfs2/cpfile.c')
| -rw-r--r-- | fs/nilfs2/cpfile.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/fs/nilfs2/cpfile.c b/fs/nilfs2/cpfile.c index 3f5d5d06f53c..d5ad54e204a5 100644 --- a/fs/nilfs2/cpfile.c +++ b/fs/nilfs2/cpfile.c | |||
| @@ -926,3 +926,29 @@ 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_read - read cpfile inode | ||
| 932 | * @cpfile: cpfile inode | ||
| 933 | * @raw_inode: on-disk cpfile inode | ||
| 934 | */ | ||
| 935 | int nilfs_cpfile_read(struct inode *cpfile, struct nilfs_inode *raw_inode) | ||
| 936 | { | ||
| 937 | return nilfs_read_inode_common(cpfile, raw_inode); | ||
| 938 | } | ||
| 939 | |||
| 940 | /** | ||
| 941 | * nilfs_cpfile_new - create cpfile | ||
| 942 | * @nilfs: nilfs object | ||
| 943 | * @cpsize: size of a checkpoint entry | ||
| 944 | */ | ||
| 945 | struct inode *nilfs_cpfile_new(struct the_nilfs *nilfs, size_t cpsize) | ||
| 946 | { | ||
| 947 | struct inode *cpfile; | ||
| 948 | |||
| 949 | cpfile = nilfs_mdt_new(nilfs, NULL, NILFS_CPFILE_INO, 0); | ||
| 950 | if (cpfile) | ||
| 951 | nilfs_mdt_set_entry_size(cpfile, cpsize, | ||
| 952 | sizeof(struct nilfs_cpfile_header)); | ||
| 953 | return cpfile; | ||
| 954 | } | ||
