public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] jfs_metapage.c: remove an unused function
@ 2004-10-28 22:24 Adrian Bunk
  2004-10-29  0:18 ` Adrian Bunk
  0 siblings, 1 reply; 3+ messages in thread
From: Adrian Bunk @ 2004-10-28 22:24 UTC (permalink / raw)
  To: shaggy; +Cc: jfs-discussion, linux-kernel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The patch below removes an unused function from fs/jfs/jfs_metapage.c


diffstat output:
 fs/jfs/jfs_metapage.c |    5 -----
 1 files changed, 5 deletions(-)


Signed-off-by: Adrian Bunk <bunk@stusta.de>

- --- linux-2.6.10-rc1-mm1-full/fs/jfs/jfs_metapage.c.old	2004-10-28 22:41:29.000000000 +0200
+++ linux-2.6.10-rc1-mm1-full/fs/jfs/jfs_metapage.c	2004-10-28 22:41:42.000000000 +0200
@@ -108,11 +108,6 @@
 	}
 }
 
- -static inline struct metapage *alloc_metapage(int no_wait)
- -{
- -	return mempool_alloc(metapage_mempool, no_wait ? GFP_ATOMIC : GFP_NOFS);
- -}
- -
 static inline void free_metapage(struct metapage *mp)
 {
 	mp->flag = 0;

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFBgXGsmfzqmE8StAARApqPAKCKO56icieQVYa4/2bVv9QATXy3wgCgpuxF
r2f/jTAlTJE1y4PwstB9aLU=
=O6wB
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [2.6 patch] jfs_metapage.c: remove an unused function
  2004-10-28 22:24 [2.6 patch] jfs_metapage.c: remove an unused function Adrian Bunk
@ 2004-10-29  0:18 ` Adrian Bunk
  2004-10-29 14:11   ` Dave Kleikamp
  0 siblings, 1 reply; 3+ messages in thread
From: Adrian Bunk @ 2004-10-29  0:18 UTC (permalink / raw)
  To: shaggy; +Cc: jfs-discussion, linux-kernel

[ this time without the problems due to a digital signature... ]

The patch below removes an unused function from fs/jfs/jfs_metapage.c


diffstat output:
 fs/jfs/jfs_metapage.c |    5 -----
 1 files changed, 5 deletions(-)


Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6.10-rc1-mm1-full/fs/jfs/jfs_metapage.c.old	2004-10-28 22:41:29.000000000 +0200
+++ linux-2.6.10-rc1-mm1-full/fs/jfs/jfs_metapage.c	2004-10-28 22:41:42.000000000 +0200
@@ -108,11 +108,6 @@
 	}
 }
 
-static inline struct metapage *alloc_metapage(int no_wait)
-{
-	return mempool_alloc(metapage_mempool, no_wait ? GFP_ATOMIC : GFP_NOFS);
-}
-
 static inline void free_metapage(struct metapage *mp)
 {
 	mp->flag = 0;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [2.6 patch] jfs_metapage.c: remove an unused function
  2004-10-29  0:18 ` Adrian Bunk
@ 2004-10-29 14:11   ` Dave Kleikamp
  0 siblings, 0 replies; 3+ messages in thread
From: Dave Kleikamp @ 2004-10-29 14:11 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: JFS Discussion, linux-kernel

On Thu, 2004-10-28 at 19:18, Adrian Bunk wrote:
> The patch below removes an unused function from fs/jfs/jfs_metapage.c
>
> --- patch removed ---

I guess I had intended to call alloc_metapage when I wrote that code,
but I never did.  This must have been my intent:

diff -urp linux.orig/fs/jfs/jfs_metapage.c linux/fs/jfs/jfs_metapage.c
--- linux.orig/fs/jfs/jfs_metapage.c	2004-10-29 08:55:16.670499440 -0500
+++ linux/fs/jfs/jfs_metapage.c	2004-10-29 08:56:35.603499800 -0500
@@ -289,7 +289,7 @@ again:
 		 */
 		mp = NULL;
 		if (JFS_IP(inode)->fileset == AGGREGATE_I) {
-			mp =  mempool_alloc(metapage_mempool, GFP_ATOMIC);
+			mp = alloc_metapage(1);
 			if (!mp) {
 				/*
 				 * mempool is supposed to protect us from
@@ -306,7 +306,7 @@ again:
 			struct metapage *mp2;
 
 			spin_unlock(&meta_lock);
-			mp =  mempool_alloc(metapage_mempool, GFP_NOFS);
+			mp = alloc_metapage(0);
 			spin_lock(&meta_lock);
 
 			/* we dropped the meta_lock, we need to search the

It seems cleaner to call alloc_metapage, since we have a corresponding
free_metapage, but this version is less cryptic:

diff -urp linux.orig/fs/jfs/jfs_metapage.c linux/fs/jfs/jfs_metapage.c
--- linux.orig/fs/jfs/jfs_metapage.c	2004-10-29 08:55:16.670499440 -0500
+++ linux/fs/jfs/jfs_metapage.c	2004-10-29 09:01:24.560571648 -0500
@@ -108,9 +108,9 @@ static void init_once(void *foo, kmem_ca
 	}
 }
 
-static inline struct metapage *alloc_metapage(int no_wait)
+static inline struct metapage *alloc_metapage(int gfp_mask)
 {
-	return mempool_alloc(metapage_mempool, no_wait ? GFP_ATOMIC : GFP_NOFS);
+	return mempool_alloc(metapage_mempool, gfp_mask);
 }
 
 static inline void free_metapage(struct metapage *mp)
@@ -289,7 +289,7 @@ again:
 		 */
 		mp = NULL;
 		if (JFS_IP(inode)->fileset == AGGREGATE_I) {
-			mp =  mempool_alloc(metapage_mempool, GFP_ATOMIC);
+			mp = alloc_metapage(GFP_ATOMIC);
 			if (!mp) {
 				/*
 				 * mempool is supposed to protect us from
@@ -306,7 +306,7 @@ again:
 			struct metapage *mp2;
 
 			spin_unlock(&meta_lock);
-			mp =  mempool_alloc(metapage_mempool, GFP_NOFS);
+			mp = alloc_metapage(GFP_NOFS);
 			spin_lock(&meta_lock);
 
 			/* we dropped the meta_lock, we need to search the
-- 
Dave Kleikamp
IBM Linux Technology Center
shaggy@austin.ibm.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-10-29 14:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-28 22:24 [2.6 patch] jfs_metapage.c: remove an unused function Adrian Bunk
2004-10-29  0:18 ` Adrian Bunk
2004-10-29 14:11   ` Dave Kleikamp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox