Skip to contentSkip to conversation

jffs2: add sparse annotations for the erase_completion_lock

PATCH New Harvey Harrison 1 participant 1 message May 30, 2008 Journalling flash file system V2 (JFFS2)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 jffs2: add sparse annotations for the erase_completion_lock

---
 fs/jffs2/gc.c       |    2 ++
 fs/jffs2/nodemgmt.c |    4 ++++
 fs/jffs2/summary.c  |    2 ++
 3 files changed, 8 insertions(+), 0 deletions(-)
fs/jffs2/gc.c +2 -0
index 090c556..6312a67 100644
@@ -39,6 +39,8 @@ static int jffs2_garbage_collect_live(struct jffs2_sb_info *c,  struct jffs2_era
 
 /* Called with erase_completion_lock held */
 static struct jffs2_eraseblock *jffs2_find_gc_block(struct jffs2_sb_info *c)
+__releases(&c->erase_completion_lock)
+__acquires(&c->erase_completion_lock)
 {
 	struct jffs2_eraseblock *ret;
 	struct list_head *nextlist = NULL;
fs/jffs2/nodemgmt.c +4 -0
index a9bf960..728c8aa 100644
@@ -204,6 +204,8 @@ static void jffs2_close_nextblock(struct jffs2_sb_info *c, struct jffs2_eraseblo
 /* Select a new jeb for nextblock */
 
 static int jffs2_find_nextblock(struct jffs2_sb_info *c)
+__releases(&c->erase_completion_lock)
+__acquires(&c->erase_completion_lock)
 {
 	struct list_head *next;
 
@@ -269,6 +271,8 @@ static int jffs2_find_nextblock(struct jffs2_sb_info *c)
 /* Called with alloc sem _and_ erase_completion_lock */
 static int jffs2_do_reserve_space(struct jffs2_sb_info *c, uint32_t minsize,
 				  uint32_t *len, uint32_t sumsize)
+__releases(&c->erase_completion_lock)
+__acquires(&c->erase_completion_lock)
 {
 	struct jffs2_eraseblock *jeb = c->nextblock;
 	uint32_t reserved_size;				/* for summary information at the end of the jeb */
fs/jffs2/summary.c +2 -0
index 629af01..8410b6c 100644
@@ -818,6 +818,8 @@ static int jffs2_sum_write_data(struct jffs2_sb_info *c, struct jffs2_eraseblock
 /* Write out summary information - called from jffs2_do_reserve_space */
 
 int jffs2_sum_write_sumnode(struct jffs2_sb_info *c)
+__releases(&c->erase_completion_lock)
+__acquires(&c->erase_completion_lock)
 {
 	int datasize, infosize, padsize;
 	struct jffs2_eraseblock *jeb;
Signature · 1 line
1.5.6.rc0.277.g804cf