From 6a4d0be681a016cd403e1da33ea12ffa02242ff3 Mon Sep 17 00:00:00 2001 From: wanxiaoqing Date: Wed, 13 Mar 2024 09:38:42 +0800 Subject: [PATCH] =?UTF-8?q?LTS=205.10=20=E8=A1=A5=E4=B8=81=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wanxiaoqing --- fs/jffs2/jffs2.patch | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/fs/jffs2/jffs2.patch b/fs/jffs2/jffs2.patch index eba19047..054bdbf5 100644 --- a/fs/jffs2/jffs2.patch +++ b/fs/jffs2/jffs2.patch @@ -8667,7 +8667,7 @@ diff -Nupr old/fs/jffs2/writev.c new/fs/jffs2/writev.c diff -Nupr old/fs/jffs2/xattr.c new/fs/jffs2/xattr.c --- old/fs/jffs2/xattr.c 2022-05-09 17:15:24.360000000 +0800 +++ new/fs/jffs2/xattr.c 1970-01-01 08:00:00.000000000 +0800 -@@ -1,1347 +0,0 @@ +@@ -1,1352 +0,0 @@ -/* - * JFFS2 -- Journalling Flash File System, Version 2. - * @@ -9442,10 +9442,10 @@ diff -Nupr old/fs/jffs2/xattr.c new/fs/jffs2/xattr.c -} - -#define XREF_TMPHASH_SIZE (128) --void jffs2_build_xattr_subsystem(struct jffs2_sb_info *c) +-int jffs2_build_xattr_subsystem(struct jffs2_sb_info *c) -{ - struct jffs2_xattr_ref *ref, *_ref; -- struct jffs2_xattr_ref *xref_tmphash[XREF_TMPHASH_SIZE]; +- struct jffs2_xattr_ref **xref_tmphash; - struct jffs2_xattr_datum *xd, *_xd; - struct jffs2_inode_cache *ic; - struct jffs2_raw_node_ref *raw; @@ -9454,9 +9454,12 @@ diff -Nupr old/fs/jffs2/xattr.c new/fs/jffs2/xattr.c - - BUG_ON(!(c->flags & JFFS2_SB_FLAG_BUILDING)); - +- xref_tmphash = kcalloc(XREF_TMPHASH_SIZE, +- sizeof(struct jffs2_xattr_ref *), GFP_KERNEL); +- if (!xref_tmphash) +- return -ENOMEM; +- - /* Phase.1 : Merge same xref */ -- for (i=0; i < XREF_TMPHASH_SIZE; i++) -- xref_tmphash[i] = NULL; - for (ref=c->xref_temp; ref; ref=_ref) { - struct jffs2_xattr_ref *tmp; - @@ -9554,6 +9557,8 @@ diff -Nupr old/fs/jffs2/xattr.c new/fs/jffs2/xattr.c - "%u of xref (%u dead, %u orphan) found.\n", - xdatum_count, xdatum_unchecked_count, xdatum_orphan_count, - xref_count, xref_dead_count, xref_orphan_count); +- kfree(xref_tmphash); +- return 0; -} - -struct jffs2_xattr_datum *jffs2_setup_xattr_datum(struct jffs2_sb_info *c,