From: "Denis V. Lunev" <den@openvz.org>
To: khorenko@virtuozzo.com
Cc: devel@openvz.org
Subject: [Devel] [PATCH hci-8.1 v3 3/5] xfs: release the balloon inode when xfs_balloon_get() refuses it
Date: Wed, 11 Nov 2026 12:31:33 +0100 [thread overview]
Message-ID: <20261111113135.4023555-4-den@openvz.org> (raw)
In-Reply-To: <20261111113135.4023555-1-den@openvz.org>
From: Denis V. Lunev <den@openvz.org>
xfs_balloon_get() looks the balloon inode up with xfs_iget() and returns
-EINVAL when it is not a regular file or is immutable, without
releasing the reference it took. Every statfs and every open of the
balloon then leaks a reference on such an inode, which the VFS reports
as a busy inode at unmount.
Release the inode before returning -EINVAL.
https://virtuozzo.atlassian.net/browse/VSTOR-153590
Feature: fs/xfs: fast online shrink support
Signed-off-by: Denis V. Lunev <den@openvz.org>
---
Notes:
Unchanged since v2.
fs/xfs/xfs_super.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index d24ceb045364..6deab3e5d76c 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -924,8 +924,10 @@ xfs_balloon_get(struct xfs_mount *mp, u64 balloon_ino, uint flags)
if (error)
return ERR_PTR(error);
inode = VFS_I(ip);
- if (!S_ISREG(inode->i_mode) || IS_IMMUTABLE(inode))
+ if (!S_ISREG(inode->i_mode) || IS_IMMUTABLE(inode)) {
+ xfs_irele(ip);
return ERR_PTR(-EINVAL);
+ }
return ip;
}
--
2.53.0
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-11-11 11:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 11:31 [Devel] [PATCH hci-8.1 v3 0/5] ext4, xfs: discard the balloon on FITRIM Denis V. Lunev
2026-11-11 11:31 ` [Devel] [PATCH hci-8.1 v3 1/5] ms/xfs: don't skip free extents in later batches of a whole-AG FITRIM Denis V. Lunev
2026-11-11 11:35 ` no-reply
2026-11-12 12:07 ` Konstantin Khorenko
2026-11-11 11:31 ` [Devel] [PATCH hci-8.1 v3 2/5] ms/xfs: don't skip free extents of the longest length in " Denis V. Lunev
2026-11-11 11:35 ` no-reply
2026-11-12 12:07 ` Konstantin Khorenko
2026-11-11 11:31 ` Denis V. Lunev [this message]
2026-11-11 11:35 ` [Devel] [PATCH hci-8.1 v3 3/5] xfs: release the balloon inode when xfs_balloon_get() refuses it no-reply
2026-11-12 12:07 ` Konstantin Khorenko
2026-11-11 11:31 ` [Devel] [PATCH hci-8.1 v3 4/5] ext4: discard the balloon on FITRIM Denis V. Lunev
2026-11-11 11:40 ` no-reply
2026-11-12 12:07 ` Konstantin Khorenko
2026-11-11 11:31 ` [Devel] [PATCH hci-8.1 v3 5/5] xfs: " Denis V. Lunev
2026-11-11 11:40 ` no-reply
2026-11-12 12:07 ` Konstantin Khorenko
2026-11-12 12:07 ` [Devel] [PATCH hci-8.1 v3 0/5] ext4, " Konstantin Khorenko
2026-11-12 12:08 ` Konstantin Khorenko
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=20261111113135.4023555-4-den@openvz.org \
--to=den@openvz.org \
--cc=devel@openvz.org \
--cc=khorenko@virtuozzo.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