Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347177
b: refs/heads/master
c: 2cbba75
h: refs/heads/master
i:
  347175: a5aba72
v: v3
  • Loading branch information
Alexey Khoroshilov authored and Artem Bityutskiy committed Nov 18, 2012
1 parent a0f7bf6 commit 10d68db
Show file tree
Hide file tree
Showing 2 changed files with 5 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: d68cbdd4fb04d2b756ad53c22f36943167b16340
refs/heads/master: 2cbba75a56ea78e6876b4e2547a882f10b3fe72b
6 changes: 4 additions & 2 deletions trunk/fs/jffs2/nodemgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,14 +417,16 @@ static int jffs2_do_reserve_space(struct jffs2_sb_info *c, uint32_t minsize,
spin_unlock(&c->erase_completion_lock);

ret = jffs2_prealloc_raw_node_refs(c, jeb, 1);
if (ret)
return ret;

/* Just lock it again and continue. Nothing much can change because
we hold c->alloc_sem anyway. In fact, it's not entirely clear why
we hold c->erase_completion_lock in the majority of this function...
but that's a question for another (more caffeine-rich) day. */
spin_lock(&c->erase_completion_lock);

if (ret)
return ret;

waste = jeb->free_size;
jffs2_link_node_ref(c, jeb,
(jeb->offset + c->sector_size - waste) | REF_OBSOLETE,
Expand Down

0 comments on commit 10d68db

Please sign in to comment.