Hello Michael,

On 05.08.24 19:31, Michael Trimarchi wrote:
The inode should be freed after a reference is get to avoid
memory leak

Signed-off-by: Michael Trimarchi <mich...@amarulasolutions.com>
---
  fs/ubifs/ubifs.c | 9 ++++++---
  1 file changed, 6 insertions(+), 3 deletions(-)

As discussed, that patch looks valid to me!

It would be good to have some testers...

Looking through the code, I think there is one more place:

$ git diff
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index d8d78a2d3d..a5d141055c 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -2322,6 +2322,7 @@ static int ubifs_fill_super(struct super_block *sb, void 
*data, int silent)
        }
 #else
        sb->s_root = NULL;
+       ubifs_iput(inode);
 #endif

        mutex_unlock(&c->umount_mutex);
$

What do you mean?

bye,
Heiko
--
DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: h...@denx.de

Reply via email to