Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250439
b: refs/heads/master
c: 69f8a75
h: refs/heads/master
i:
  250437: a9eb1df
  250435: 514e9c3
  250431: f60152c
v: v3
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed May 13, 2011
1 parent 321105c commit f885bee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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: 4c9545200a3bd9e87b36475c263034a38be02e44
refs/heads/master: 69f8a75a7d9db05a7ee708514d605ab74956c73e
9 changes: 7 additions & 2 deletions trunk/fs/ubifs/recovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,7 @@ static int fix_size_in_place(struct ubifs_info *c, struct size_entry *e)
err = ubi_leb_change(c->ubi, lnum, c->sbuf, len, UBI_UNKNOWN);
if (err)
goto out;
dbg_rcvry("inode %lu at %d:%d size %lld -> %lld ",
dbg_rcvry("inode %lu at %d:%d size %lld -> %lld",
(unsigned long)e->inum, lnum, offs, i_size, e->d_size);
return 0;

Expand Down Expand Up @@ -1485,11 +1485,14 @@ int ubifs_recover_size(struct ubifs_info *c)
e->i_size = le64_to_cpu(ino->size);
}
}

if (e->exists && e->i_size < e->d_size) {
if (!e->inode && c->ro_mount) {
if (c->ro_mount) {
/* Fix the inode size and pin it in memory */
struct inode *inode;

ubifs_assert(!e->inode);

inode = ubifs_iget(c->vfs_sb, e->inum);
if (IS_ERR(inode))
return PTR_ERR(inode);
Expand All @@ -1513,9 +1516,11 @@ int ubifs_recover_size(struct ubifs_info *c)
iput(e->inode);
}
}

this = rb_next(this);
rb_erase(&e->rb, &c->size_tree);
kfree(e);
}

return 0;
}

0 comments on commit f885bee

Please sign in to comment.