Skip to contentSkip to conversation

ocfs2: clean up an unused variable 'wants_rotate' in ocfs2_truncate_rec

PATCH New piaojun 3 participants 4 messages Mar 17, 2016 – Mar 26, 2016 OCFS2

lore
Share & tools
lore

piaojun

author
#0 lore raw

PATCH 1/1 ocfs2: clean up an unused variable 'wants_rotate' in ocfs2_truncate_rec

Clean up an unused variable 'wants_rotate' in ocfs2_truncate_rec.

---
 alloc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
alloc.c +1 -2
index d002579..2b8b721 100644
@@ -5334,7 +5334,7 @@ static int ocfs2_truncate_rec(handle_t *handle,
 {
 	int ret;
 	u32 left_cpos, rec_range, trunc_range;
-	int wants_rotate = 0, is_rightmost_tree_rec = 0;
+	int is_rightmost_tree_rec = 0;
 	struct super_block *sb = ocfs2_metadata_cache_get_super(et->et_ci);
 	struct ocfs2_path *left_path = NULL;
 	struct ocfs2_extent_list *el = path_leaf_el(path);
@@ -5431,7 +5431,6 @@ static int ocfs2_truncate_rec(handle_t *handle,
 
 		memset(rec, 0, sizeof(*rec));
 		ocfs2_cleanup_merge(el, index);
-		wants_rotate = 1;
 
 		next_free = le16_to_cpu(el->l_next_free_rec);
 		if (is_rightmost_tree_rec && next_free > 1) {
Signature · 1 line
1.8.4.3
#1 lore raw

PATCH 1/1 ocfs2: clean up an unused variable 'wants_rotate' in ocfs2_truncate_rec

Quoted 3 lines · piaojun

Clean up an unused variable 'wants_rotate' in ocfs2_truncate_rec.

Quoted 26 lines
---
 alloc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
alloc.c +1 -2
index d002579..2b8b721 100644
@@ -5334,7 +5334,7 @@ static int ocfs2_truncate_rec(handle_t *handle,
 {
 	int ret;
 	u32 left_cpos, rec_range, trunc_range;
-	int wants_rotate = 0, is_rightmost_tree_rec = 0;
+	int is_rightmost_tree_rec = 0;
 	struct super_block *sb = ocfs2_metadata_cache_get_super(et->et_ci);
 	struct ocfs2_path *left_path = NULL;
 	struct ocfs2_extent_list *el = path_leaf_el(path);
@@ -5431,7 +5431,6 @@ static int ocfs2_truncate_rec(handle_t *handle,
 
 		memset(rec, 0, sizeof(*rec));
 		ocfs2_cleanup_merge(el, index);
-		wants_rotate = 1;
 
 		next_free = le16_to_cpu(el->l_next_free_rec);
 		if (is_rightmost_tree_rec && next_free > 1) {
#2 lore raw

PATCH 1/1 ocfs2: clean up an unused variable 'wants_rotate' in ocfs2_truncate_rec

In reply to piaojun

alloc.c

Quoted 11 lines · On Thu, 17 Mar 2016 17:11:27 +0800 piaojun <[email protected]> wrote:

Clean up an unused variable 'wants_rotate' in ocfs2_truncate_rec.

---
 alloc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
alloc.c +0 -0
index d002579..2b8b721 100644

This should be

--- a/fs/ocfs2/alloc.c
+++ b/fs/ocfs2/alloc.c

please. `patch -p1' form.

author
#3 lore raw

PATCH 1/1 ocfs2: clean up an unused variable 'wants_rotate' in ocfs2_truncate_rec

Clean up an unused variable 'wants_rotate' in ocfs2_truncate_rec.

---
 fs/ocfs2/alloc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/ocfs2/alloc.c +1 -2
index d002579..2b8b721 100644
@@ -5334,7 +5334,7 @@ static int ocfs2_truncate_rec(handle_t *handle,
 {
 	int ret;
 	u32 left_cpos, rec_range, trunc_range;
-	int wants_rotate = 0, is_rightmost_tree_rec = 0;
+	int is_rightmost_tree_rec = 0;
 	struct super_block *sb = ocfs2_metadata_cache_get_super(et->et_ci);
 	struct ocfs2_path *left_path = NULL;
 	struct ocfs2_extent_list *el = path_leaf_el(path);
@@ -5431,7 +5431,6 @@ static int ocfs2_truncate_rec(handle_t *handle,
 
 		memset(rec, 0, sizeof(*rec));
 		ocfs2_cleanup_merge(el, index);
-		wants_rotate = 1;
 
 		next_free = le16_to_cpu(el->l_next_free_rec);
 		if (is_rightmost_tree_rec && next_free > 1) {
Signature · 1 line
1.8.4.3
Quoted 19 lines · Andrew Morton

alloc.c

Quoted 11 lines · On Thu, 17 Mar 2016 17:11:27 +0800 piaojun <[email protected]> wrote:

Clean up an unused variable 'wants_rotate' in ocfs2_truncate_rec.

---
 alloc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
alloc.c +0 -0
index d002579..2b8b721 100644

This should be

fs/ocfs2/alloc.c +0 -0
Quoted 6 lines

please. `patch -p1' form.

.

I make a new patch according to your suggestion, thks.