Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Penglei Jiang <superman.xpt@gmail.com>
Cc: stable@vger.kernel.org
Subject: Re: [PATCH v2 6.14.y] btrfs: fix the inode leak in btrfs_iget()
Date: Wed, 7 May 2025 11:23:31 +0200	[thread overview]
Message-ID: <2025050752-maturely-urology-62bd@gregkh> (raw)
In-Reply-To: <20250505150322.40733-1-superman.xpt@gmail.com>

On Mon, May 05, 2025 at 08:03:22AM -0700, Penglei Jiang wrote:
> The commit 48c1d1bb525b1c44b8bdc8e7ec5629cb6c2b9fc4 fails to compile
> in kernel version 6.14.
> 
> Version 6.14:
>     struct inode *btrfs_iget(u64 ino, struct btrfs_root *root)
>     {
>             struct inode *inode;
>             ~~~~~~~~~~~~~~
>             ...
>             inode = btrfs_iget_locked(ino, root);
>             ...
>     }
> 
> Version 6.15:
>     struct btrfs_inode *btrfs_iget(u64 ino, struct btrfs_root *root)
>     {
>             struct btrfs_inode *inode;
>             ~~~~~~~~~~~~~~~~~~~~
>             ...
>             inode = btrfs_iget_locked(ino, root);
>             ...
>     }
> 
> In kernel version 6.14, the function btrfs_iget_locked() returns a
> struct inode *, so the patch code adjusts to use iget_failed(inode).
> 
> Reported-by: Penglei Jiang <superman.xpt@gmail.com>
> Link: https://lore.kernel.org/linux-btrfs/20250421102425.44431-1-superman.xpt@gmail.com/
> Fixes: 7c855e16ab72 ("btrfs: remove conditional path allocation in btrfs_read_locked_inode()")
> Signed-off-by: Penglei Jiang <superman.xpt@gmail.com>
> ---
>  fs/btrfs/inode.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

This is not a v2, it is a totally different patch.

Please just fix up your original backport to build properly when you
submit it, don't send a "fix up patch" to solve a build problem a
previous patch added.

thanks,

greg k-h

  reply	other threads:[~2025-05-07  9:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-05  7:41 FAILED: patch "[PATCH] btrfs: fix the inode leak in btrfs_iget()" failed to apply to 6.14-stable tree gregkh
2025-05-05 15:03 ` [PATCH v2 6.14.y] btrfs: fix the inode leak in btrfs_iget() Penglei Jiang
2025-05-07  9:23   ` Greg KH [this message]
2025-05-08 16:18   ` Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2025050752-maturely-urology-62bd@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=stable@vger.kernel.org \
    --cc=superman.xpt@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox