From: Denis V. Lunev <[email protected]> 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 <[email protected]> --- 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 [email protected] https://lists.openvz.org/mailman/listinfo/devel
