Skip to contentSkip to conversation

reiser4: fix reiser4_post_{commit,write_back}_hook() and their invocations.

PATCH Superseded Ivan Shapovalov 2 participants 2 messages Jun 17, 2014 – Jun 18, 2014

v1 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 reiser4: fix reiser4_post_{commit,write_back}_hook() and their invocations.

- let all hooks be called from one place (reiser4_write_logs())
- don't call reiser4_post_write_back_hook() twice
- fix reiser4_post_write_back_hook(): call the correct method of space allocator

---
 fs/reiser4/block_alloc.c | 2 +-
 fs/reiser4/wander.c      | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)
fs/reiser4/block_alloc.c +1 -1
index 81ed96f..3a4b667 100644
@@ -1150,7 +1150,7 @@ void reiser4_post_write_back_hook(void)
 {
 	assert("zam-504", get_current_super_private() != NULL);
 
-	sa_post_commit_hook();
+	sa_post_write_back_hook();
 }
 
 /*
fs/reiser4/wander.c +1 -2
index 0b518c3..4e29de8 100644
@@ -1140,7 +1140,6 @@ static int write_tx_back(struct commit_handle * ch)
 	int ret;
 	int barrier;
 
-	reiser4_post_commit_hook();
 	fq = get_fq_for_current_atom();
 	if (IS_ERR(fq))
 		return  PTR_ERR(fq);
@@ -1165,7 +1164,6 @@ static int write_tx_back(struct commit_handle * ch)
 		if (ret)
 			return ret;
 	}
-	reiser4_post_write_back_hook();
 	return 0;
 }
 
@@ -1251,6 +1249,7 @@ int reiser4_write_logs(long *nr_submitted)
 	spin_lock_atom(atom);
 	reiser4_atom_set_stage(atom, ASTAGE_POST_COMMIT);
 	spin_unlock_atom(atom);
+	reiser4_post_commit_hook();
 
 	ret = write_tx_back(&ch);
 	reiser4_post_write_back_hook();
Signature · 1 line
2.0.0
#1 lore raw

OK.

Quoted 49 lines · Ivan Shapovalov

- let all hooks be called from one place (reiser4_write_logs())
- don't call reiser4_post_write_back_hook() twice
- fix reiser4_post_write_back_hook(): call the correct method of space allocator

---
  fs/reiser4/block_alloc.c | 2 +-
  fs/reiser4/wander.c      | 3 +--
  2 files changed, 2 insertions(+), 3 deletions(-)
fs/reiser4/block_alloc.c +1 -1
index 81ed96f..3a4b667 100644
@@ -1150,7 +1150,7 @@ void reiser4_post_write_back_hook(void)
  {
  	assert("zam-504", get_current_super_private() != NULL);
 
-	sa_post_commit_hook();
+	sa_post_write_back_hook();
  }
 
  /*
fs/reiser4/wander.c +1 -2
index 0b518c3..4e29de8 100644
@@ -1140,7 +1140,6 @@ static int write_tx_back(struct commit_handle * ch)
  	int ret;
  	int barrier;
 
-	reiser4_post_commit_hook();
  	fq = get_fq_for_current_atom();
  	if (IS_ERR(fq))
  		return  PTR_ERR(fq);
@@ -1165,7 +1164,6 @@ static int write_tx_back(struct commit_handle * ch)
  		if (ret)
  			return ret;
  	}
-	reiser4_post_write_back_hook();
  	return 0;
  }
 
@@ -1251,6 +1249,7 @@ int reiser4_write_logs(long *nr_submitted)
  	spin_lock_atom(atom);
  	reiser4_atom_set_stage(atom, ASTAGE_POST_COMMIT);
  	spin_unlock_atom(atom);
+	reiser4_post_commit_hook();
 
  	ret = write_tx_back(&ch);
  	reiser4_post_write_back_hook();