diff options
Diffstat (limited to 'fs/ubifs/super.c')
-rw-r--r-- | fs/ubifs/super.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 76e4e0566ad6..001acccac0d6 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c | |||
@@ -246,8 +246,8 @@ struct inode *ubifs_iget(struct super_block *sb, unsigned long inum) | |||
246 | 246 | ||
247 | out_invalid: | 247 | out_invalid: |
248 | ubifs_err("inode %lu validation failed, error %d", inode->i_ino, err); | 248 | ubifs_err("inode %lu validation failed, error %d", inode->i_ino, err); |
249 | dbg_dump_node(c, ino); | 249 | ubifs_dump_node(c, ino); |
250 | dbg_dump_inode(c, inode); | 250 | ubifs_dump_inode(c, inode); |
251 | err = -EINVAL; | 251 | err = -EINVAL; |
252 | out_ino: | 252 | out_ino: |
253 | kfree(ino); | 253 | kfree(ino); |
@@ -668,8 +668,8 @@ static int init_constants_sb(struct ubifs_info *c) | |||
668 | tmp = UBIFS_CS_NODE_SZ + UBIFS_REF_NODE_SZ * c->jhead_cnt; | 668 | tmp = UBIFS_CS_NODE_SZ + UBIFS_REF_NODE_SZ * c->jhead_cnt; |
669 | tmp = ALIGN(tmp, c->min_io_size); | 669 | tmp = ALIGN(tmp, c->min_io_size); |
670 | if (tmp > c->leb_size) { | 670 | if (tmp > c->leb_size) { |
671 | dbg_err("too small LEB size %d, at least %d needed", | 671 | ubifs_err("too small LEB size %d, at least %d needed", |
672 | c->leb_size, tmp); | 672 | c->leb_size, tmp); |
673 | return -EINVAL; | 673 | return -EINVAL; |
674 | } | 674 | } |
675 | 675 | ||
@@ -683,8 +683,8 @@ static int init_constants_sb(struct ubifs_info *c) | |||
683 | tmp /= c->leb_size; | 683 | tmp /= c->leb_size; |
684 | tmp += 1; | 684 | tmp += 1; |
685 | if (c->log_lebs < tmp) { | 685 | if (c->log_lebs < tmp) { |
686 | dbg_err("too small log %d LEBs, required min. %d LEBs", | 686 | ubifs_err("too small log %d LEBs, required min. %d LEBs", |
687 | c->log_lebs, tmp); | 687 | c->log_lebs, tmp); |
688 | return -EINVAL; | 688 | return -EINVAL; |
689 | } | 689 | } |
690 | 690 | ||
@@ -813,13 +813,10 @@ static int alloc_wbufs(struct ubifs_info *c) | |||
813 | c->jheads[i].grouped = 1; | 813 | c->jheads[i].grouped = 1; |
814 | } | 814 | } |
815 | 815 | ||
816 | c->jheads[BASEHD].wbuf.dtype = UBI_SHORTTERM; | ||
817 | /* | 816 | /* |
818 | * Garbage Collector head likely contains long-term data and | 817 | * Garbage Collector head does not need to be synchronized by timer. |
819 | * does not need to be synchronized by timer. Also GC head nodes are | 818 | * Also GC head nodes are not grouped. |
820 | * not grouped. | ||
821 | */ | 819 | */ |
822 | c->jheads[GCHD].wbuf.dtype = UBI_LONGTERM; | ||
823 | c->jheads[GCHD].wbuf.no_timer = 1; | 820 | c->jheads[GCHD].wbuf.no_timer = 1; |
824 | c->jheads[GCHD].grouped = 0; | 821 | c->jheads[GCHD].grouped = 0; |
825 | 822 | ||
@@ -863,7 +860,7 @@ static void free_orphans(struct ubifs_info *c) | |||
863 | orph = list_entry(c->orph_list.next, struct ubifs_orphan, list); | 860 | orph = list_entry(c->orph_list.next, struct ubifs_orphan, list); |
864 | list_del(&orph->list); | 861 | list_del(&orph->list); |
865 | kfree(orph); | 862 | kfree(orph); |
866 | dbg_err("orphan list not empty at unmount"); | 863 | ubifs_err("orphan list not empty at unmount"); |
867 | } | 864 | } |
868 | 865 | ||
869 | vfree(c->orph_buf); | 866 | vfree(c->orph_buf); |
@@ -1147,8 +1144,8 @@ static int check_free_space(struct ubifs_info *c) | |||
1147 | ubifs_assert(c->dark_wm > 0); | 1144 | ubifs_assert(c->dark_wm > 0); |
1148 | if (c->lst.total_free + c->lst.total_dirty < c->dark_wm) { | 1145 | if (c->lst.total_free + c->lst.total_dirty < c->dark_wm) { |
1149 | ubifs_err("insufficient free space to mount in R/W mode"); | 1146 | ubifs_err("insufficient free space to mount in R/W mode"); |
1150 | dbg_dump_budg(c, &c->bi); | 1147 | ubifs_dump_budg(c, &c->bi); |
1151 | dbg_dump_lprops(c); | 1148 | ubifs_dump_lprops(c); |
1152 | return -ENOSPC; | 1149 | return -ENOSPC; |
1153 | } | 1150 | } |
1154 | return 0; | 1151 | return 0; |
@@ -1301,7 +1298,7 @@ static int mount_ubifs(struct ubifs_info *c) | |||
1301 | if (!c->ro_mount && c->space_fixup) { | 1298 | if (!c->ro_mount && c->space_fixup) { |
1302 | err = ubifs_fixup_free_space(c); | 1299 | err = ubifs_fixup_free_space(c); |
1303 | if (err) | 1300 | if (err) |
1304 | goto out_master; | 1301 | goto out_lpt; |
1305 | } | 1302 | } |
1306 | 1303 | ||
1307 | if (!c->ro_mount) { | 1304 | if (!c->ro_mount) { |
@@ -2126,8 +2123,8 @@ static struct dentry *ubifs_mount(struct file_system_type *fs_type, int flags, | |||
2126 | */ | 2123 | */ |
2127 | ubi = open_ubi(name, UBI_READONLY); | 2124 | ubi = open_ubi(name, UBI_READONLY); |
2128 | if (IS_ERR(ubi)) { | 2125 | if (IS_ERR(ubi)) { |
2129 | dbg_err("cannot open \"%s\", error %d", | 2126 | ubifs_err("cannot open \"%s\", error %d", |
2130 | name, (int)PTR_ERR(ubi)); | 2127 | name, (int)PTR_ERR(ubi)); |
2131 | return ERR_CAST(ubi); | 2128 | return ERR_CAST(ubi); |
2132 | } | 2129 | } |
2133 | 2130 | ||