[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <77b1b228-3799-43e3-ab30-5aec1d633816@I-love.SAKURA.ne.jp>
Date: Tue, 8 Apr 2025 15:04:34 +0900
From: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To: Andreas Gruenbacher <agruenba@...hat.com>, cgroups@...r.kernel.org
Cc: Jan Kara <jack@...e.cz>, Rafael Aquini <aquini@...hat.com>,
gfs2@...ts.linux.dev, linux-mm@...ck.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC 1/2] gfs2: replace sd_aspace with sd_inode
On 2025/04/08 3:21, Andreas Gruenbacher wrote:
> @@ -1156,6 +1146,18 @@ static int gfs2_fill_super(struct super_block *sb, struct fs_context *fc)
> sb->s_flags |= SB_NOSEC;
> sb->s_magic = GFS2_MAGIC;
> sb->s_op = &gfs2_super_ops;
> +
> + /* Set up an address space for metadata writes */
> + sdp->sd_inode = new_inode(sb);
> + if (!sdp->sd_inode)
> + goto fail_free;
> + sdp->sd_inode->i_ino = GFS2_BAD_INO;
> + sdp->sd_inode->i_size = OFFSET_MAX;
> +
> + mapping = gfs2_aspace(sdp);
> + mapping->a_ops = &gfs2_rgrp_aops;
> + mapping_set_gfp_mask(mapping, GFP_NOFS);
> +
> sb->s_d_op = &gfs2_dops;
> sb->s_export_op = &gfs2_export_ops;
> sb->s_qcop = &gfs2_quotactl_ops;
This will be an inode leak when hitting e.g.
error = init_names(sdp, silent);
if (error)
goto fail_free;
path, for what free_sbd() in
fail_free:
free_sbd(sdp);
sb->s_fs_info = NULL;
return error;
path does is nothing but free_percpu() and kfree().
Powered by blists - more mailing lists