Message ID | 53CDBFDB.6080300@huawei.com |
---|---|
State | RFC |
Headers | show |
On Tue, 2014-07-22 at 09:35 +0800, hujianyang wrote: > I have to tell you this patch seems wrong. I've tested this patch > and saw lots of 'assert_failed()'. We use ubifs_next_log_lnum() > as an iterator to scan the hole log area and the return value of > this function may equal to c->ltail_lnum. OK, thanks. I've reverted my bogus patch. Would you please re-send your patch with proper commit message, etc, so that I could 'git am' it. This time I'd like to apply a patch which has been tested. Thanks!
> > Would you please re-send your patch with proper commit message, etc, so > that I could 'git am' it. This time I'd like to apply a patch which has > been tested. Thanks! > I've tested this patch and resend it. I don't think you can just am it because you know, I'm not very good at English. So I think you should change some comments as before. Sorry for that, and thanks for your help these days. I'd like to improve my English but it needs some time. -.-
diff --git a/fs/ubifs/log.c b/fs/ubifs/log.c index 7e818ec..c14628f 100644 --- a/fs/ubifs/log.c +++ b/fs/ubifs/log.c @@ -244,6 +244,7 @@ int ubifs_add_bud_to_log(struct ubifs_info *c, int jhead, int lnum, int offs) if (c->lhead_offs > c->leb_size - c->ref_node_alsz) { c->lhead_lnum = ubifs_next_log_lnum(c, c->lhead_lnum); + ubifs_assert(c->lhead_lnum != c->ltail_lnum); c->lhead_offs = 0; } @@ -408,6 +409,7 @@ int ubifs_log_start_commit(struct ubifs_info *c, int *ltail_lnum) /* Switch to the next log LEB */ if (c->lhead_offs) { c->lhead_lnum = ubifs_next_log_lnum(c, c->lhead_lnum); + ubifs_assert(c->lhead_lnum != c->ltail_lnum); c->lhead_offs = 0; }