Skip to contentSkip to conversation

swap : remove unused field of swapper_space

PATCH In review Huang Shijie 2 participants 3 messages Sep 25, 2009 – Sep 27, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 swap : remove unused field of swapper_space

There is no place to use the i_mmap_nonlinear of swapper_space, so remove it.

---
 mm/swap_state.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
mm/swap_state.c +0 -1
index 6d1daeb..be16a6b 100644
@@ -43,7 +43,6 @@ struct address_space swapper_space = {
 	.page_tree	= RADIX_TREE_INIT(GFP_ATOMIC|__GFP_NOWARN),
 	.tree_lock	= __SPIN_LOCK_UNLOCKED(swapper_space.tree_lock),
 	.a_ops		= &swap_aops,
-	.i_mmap_nonlinear = LIST_HEAD_INIT(swapper_space.i_mmap_nonlinear),
 	.backing_dev_info = &swap_backing_dev_info,
 };
 
Signature · 7 lines
1.6.0.6

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#1 lore raw
Quoted 4 lines · Huang Shijie

There is no place to use the i_mmap_nonlinear of swapper_space, so remove it.

I say NAK, unless you're very sure:
see commit comment below when I added that line.

Hugh

Quoted 9 lines
---
 mm/swap_state.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
mm/swap_state.c +0 -0
index 6d1daeb..be16a6b 100644

mm/swap_state.c struct address_space swapper_space = { · line 48

Quoted 7 lines
mm/swap_state.c +0 -1
@@ -43,7 +43,6 @@ struct address_space swapper_space = {
 	.page_tree	= RADIX_TREE_INIT(GFP_ATOMIC|__GFP_NOWARN),
 	.tree_lock	= __SPIN_LOCK_UNLOCKED(swapper_space.tree_lock),
 	.a_ops		= &swap_aops,
-	.i_mmap_nonlinear = LIST_HEAD_INIT(swapper_space.i_mmap_nonlinear),
 	.backing_dev_info = &swap_backing_dev_info,
 };
 

commit e11f2cc49856eabafed09cf30e190646f78b7207

Author: Hugh Dickins <[email protected]>
Date:   Fri Jun 4 20:51:55 2004 -0700

[PATCH] mm: swapper_space.i_mmap_nonlinear

Initialize swapper_space.i_mmap_nonlinear, so mapping_mapped reports false on it (as it used to do). Update comment on swapper_space, now more fields are used than those initialized explicitly.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#2 lore raw

Hugh Dickins a??e??:

Quoted 39 lines · Huang Shijie
Quoted 7 lines

There is no place to use the i_mmap_nonlinear of swapper_space, so remove it.

I say NAK, unless you're very sure:
see commit comment below when I added that line.

Hugh

Quoted 10 lines
---
 mm/swap_state.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
mm/swap_state.c +0 -0
index 6d1daeb..be16a6b 100644

mm/swap_state.c struct address_space swapper_space = { · line 48

Quoted 7 lines
mm/swap_state.c +0 -1
@@ -43,7 +43,6 @@ struct address_space swapper_space = {
 	.page_tree	= RADIX_TREE_INIT(GFP_ATOMIC|__GFP_NOWARN),
 	.tree_lock	= __SPIN_LOCK_UNLOCKED(swapper_space.tree_lock),
 	.a_ops		= &swap_aops,
-	.i_mmap_nonlinear = LIST_HEAD_INIT(swapper_space.i_mmap_nonlinear),
 	.backing_dev_info = &swap_backing_dev_info,
 };
 

commit e11f2cc49856eabafed09cf30e190646f78b7207

Author: Hugh Dickins <[email protected]>
Date:   Fri Jun 4 20:51:55 2004 -0700

[PATCH] mm: swapper_space.i_mmap_nonlinear

Quoted 9 lines

Initialize swapper_space.i_mmap_nonlinear, so mapping_mapped reports false on it (as it used to do). Update comment on swapper_space, now more fields are used than those initialized explicitly.

Yes ,you are right.

I didn't notice that there were other places calling mapping_mapped() in non-x86 archs. The result generated by the default "make cscope" fooled me.

thanks.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>