Adrian Bunk | 22 Jun 12:03
Picon
Favicon

[2.6 patch] fs/jffs2/: make 2 functions static

This patch makes two needlessly global functions static.

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

---

 fs/jffs2/malloc.c   |    2 +-
 fs/jffs2/nodelist.h |    2 --
 fs/jffs2/scan.c     |    4 ++--
 3 files changed, 3 insertions(+), 5 deletions(-)

--- linux-2.6.17-mm1-full/fs/jffs2/malloc.c.old	2006-06-22 11:31:15.000000000 +0200
+++ linux-2.6.17-mm1-full/fs/jffs2/malloc.c	2006-06-22 11:31:23.000000000 +0200
@@ -190,7 +190,7 @@
 	kmem_cache_free(tmp_dnode_info_slab, x);
 }

-struct jffs2_raw_node_ref *jffs2_alloc_refblock(void)
+static struct jffs2_raw_node_ref *jffs2_alloc_refblock(void)
 {
 	struct jffs2_raw_node_ref *ret;

--- linux-2.6.17-mm1-full/fs/jffs2/nodelist.h.old	2006-06-22 11:31:31.000000000 +0200
+++ linux-2.6.17-mm1-full/fs/jffs2/nodelist.h	2006-06-22 11:31:38.000000000 +0200
@@ -427,8 +427,6 @@
 /* scan.c */
 int jffs2_scan_medium(struct jffs2_sb_info *c);
 void jffs2_rotate_lists(struct jffs2_sb_info *c);
-int jffs2_fill_scan_buf(struct jffs2_sb_info *c, void *buf,
-				uint32_t ofs, uint32_t len);
(Continue reading)

Adrian Bunk | 28 Jun 18:54
Picon
Favicon

[2.6 patch] fs/jffs2/: make 2 functions static

This patch makes two needlessly global functions static.

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

---

This patch was already sent on:
- 22 Jun 2006

 fs/jffs2/malloc.c   |    2 +-
 fs/jffs2/nodelist.h |    2 --
 fs/jffs2/scan.c     |    4 ++--
 3 files changed, 3 insertions(+), 5 deletions(-)

--- linux-2.6.17-mm1-full/fs/jffs2/malloc.c.old	2006-06-22 11:31:15.000000000 +0200
+++ linux-2.6.17-mm1-full/fs/jffs2/malloc.c	2006-06-22 11:31:23.000000000 +0200
@@ -190,7 +190,7 @@
 	kmem_cache_free(tmp_dnode_info_slab, x);
 }

-struct jffs2_raw_node_ref *jffs2_alloc_refblock(void)
+static struct jffs2_raw_node_ref *jffs2_alloc_refblock(void)
 {
 	struct jffs2_raw_node_ref *ret;

--- linux-2.6.17-mm1-full/fs/jffs2/nodelist.h.old	2006-06-22 11:31:31.000000000 +0200
+++ linux-2.6.17-mm1-full/fs/jffs2/nodelist.h	2006-06-22 11:31:38.000000000 +0200
@@ -427,8 +427,6 @@
 /* scan.c */
 int jffs2_scan_medium(struct jffs2_sb_info *c);
(Continue reading)

Adrian Bunk | 29 Jun 15:01
Picon
Favicon

unused fs/jffs2/acl.c:jffs2_clear_acl()

Hi David,

it might not have been intended that jffs2_clear_acl() in Linus' tree is 
unused?

cu
Adrian

--

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

David Woodhouse | 29 Jun 15:16
Favicon

Re: unused fs/jffs2/acl.c:jffs2_clear_acl()

On Thu, 2006-06-29 at 15:01 +0200, Adrian Bunk wrote:
> it might not have been intended that jffs2_clear_acl() in Linus' tree
> is unused?

I suspect you're right -- thanks for pointing it out.

Kaigai-san?

--

-- 
dwmw2

KaiGai Kohei | 29 Jun 16:27
Picon

Re: unused fs/jffs2/acl.c:jffs2_clear_acl()

David Woodhouse wrote:
> On Thu, 2006-06-29 at 15:01 +0200, Adrian Bunk wrote:
> 
>>it might not have been intended that jffs2_clear_acl() in Linus' tree
>>is unused?
> 
> 
> I suspect you're right -- thanks for pointing it out.
> 
> Kaigai-san?

I'm sorry, it's a serious BUG.
When an inode is cleared, jffs2_clear_acl() should be called
to release on-memory ACL. Because the current implementation
didn't care about this cleaning-up, we have memory-leaking.

Please wait a patch for a while.

Thanks,
--

-- 
KaiGai Kohei <kaigai <at> kaigai.gr.jp>
David Woodhouse | 30 Jun 00:14
Favicon

Re: [2.6 patch] fs/jffs2/: make 2 functions static

On Wed, 2006-06-28 at 18:54 +0200, Adrian Bunk wrote:
> This patch makes two needlessly global functions static.

Applied; thanks.

To be honest though, I'd _much_ rather get GCC bugs 27898 and 27899
fixed and start building stuff like file systems with -fwhole-program
--combine. It gives about a 4% reduction in code size.

--

-- 
dwmw2


Gmane