lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202107101521.tDiLoqlw-lkp@intel.com>
Date:   Sat, 10 Jul 2021 15:46:42 +0800
From:   kernel test robot <lkp@...el.com>
To:     "Darrick J. Wong" <darrick.wong@...cle.com>
Cc:     clang-built-linux@...glegroups.com, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Chandan Babu R <chandanrlinux@...il.com>,
        Sasha Levin <sashal@...nel.org>
Subject: [linux-stable-rc:linux-5.4.y 2906/4278] fs/xfs/xfs_rtalloc.c:892:1:
 warning: stack frame size (1056) exceeds limit (1024) in function
 'xfs_growfs_rt'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
head:   f52a40401ee9825556cc803c110c67bfec5f6b94
commit: b2844ba3d37cba994fc9e591e7bed17c7a0408d7 [2906/4278] xfs: fix realtime bitmap/summary file truncation when growing rt volume
config: mips-buildonly-randconfig-r002-20210709 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8d69635ed9ecf36fd0ca85906bfde17949671cbe)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=b2844ba3d37cba994fc9e591e7bed17c7a0408d7
        git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
        git fetch --no-tags linux-stable-rc linux-5.4.y
        git checkout b2844ba3d37cba994fc9e591e7bed17c7a0408d7
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

>> fs/xfs/xfs_rtalloc.c:892:1: warning: stack frame size (1056) exceeds limit (1024) in function 'xfs_growfs_rt' [-Wframe-larger-than]
   xfs_growfs_rt(
   ^
   1 warning generated.


vim +/xfs_growfs_rt +892 fs/xfs/xfs_rtalloc.c

65eed012d1f2d0 Omar Sandoval       2018-12-21   883  
^1da177e4c3f41 Linus Torvalds      2005-04-16   884  /*
^1da177e4c3f41 Linus Torvalds      2005-04-16   885   * Visible (exported) functions.
^1da177e4c3f41 Linus Torvalds      2005-04-16   886   */
^1da177e4c3f41 Linus Torvalds      2005-04-16   887  
^1da177e4c3f41 Linus Torvalds      2005-04-16   888  /*
^1da177e4c3f41 Linus Torvalds      2005-04-16   889   * Grow the realtime area of the filesystem.
^1da177e4c3f41 Linus Torvalds      2005-04-16   890   */
^1da177e4c3f41 Linus Torvalds      2005-04-16   891  int
^1da177e4c3f41 Linus Torvalds      2005-04-16  @892  xfs_growfs_rt(
^1da177e4c3f41 Linus Torvalds      2005-04-16   893  	xfs_mount_t	*mp,		/* mount point for filesystem */
^1da177e4c3f41 Linus Torvalds      2005-04-16   894  	xfs_growfs_rt_t	*in)		/* growfs rt input struct */
^1da177e4c3f41 Linus Torvalds      2005-04-16   895  {
^1da177e4c3f41 Linus Torvalds      2005-04-16   896  	xfs_rtblock_t	bmbno;		/* bitmap block number */
^1da177e4c3f41 Linus Torvalds      2005-04-16   897  	xfs_buf_t	*bp;		/* temporary buffer */
^1da177e4c3f41 Linus Torvalds      2005-04-16   898  	int		error;		/* error return value */
^1da177e4c3f41 Linus Torvalds      2005-04-16   899  	xfs_mount_t	*nmp;		/* new (fake) mount structure */
d5cf09baced0ef Christoph Hellwig   2014-07-30   900  	xfs_rfsblock_t	nrblocks;	/* new number of realtime blocks */
^1da177e4c3f41 Linus Torvalds      2005-04-16   901  	xfs_extlen_t	nrbmblocks;	/* new number of rt bitmap blocks */
d5cf09baced0ef Christoph Hellwig   2014-07-30   902  	xfs_rtblock_t	nrextents;	/* new number of realtime extents */
^1da177e4c3f41 Linus Torvalds      2005-04-16   903  	uint8_t		nrextslog;	/* new log2 of sb_rextents */
^1da177e4c3f41 Linus Torvalds      2005-04-16   904  	xfs_extlen_t	nrsumblocks;	/* new number of summary blocks */
^1da177e4c3f41 Linus Torvalds      2005-04-16   905  	uint		nrsumlevels;	/* new rt summary levels */
^1da177e4c3f41 Linus Torvalds      2005-04-16   906  	uint		nrsumsize;	/* new size of rt summary, bytes */
^1da177e4c3f41 Linus Torvalds      2005-04-16   907  	xfs_sb_t	*nsbp;		/* new superblock */
^1da177e4c3f41 Linus Torvalds      2005-04-16   908  	xfs_extlen_t	rbmblocks;	/* current number of rt bitmap blocks */
^1da177e4c3f41 Linus Torvalds      2005-04-16   909  	xfs_extlen_t	rsumblocks;	/* current number of rt summary blks */
^1da177e4c3f41 Linus Torvalds      2005-04-16   910  	xfs_sb_t	*sbp;		/* old superblock */
^1da177e4c3f41 Linus Torvalds      2005-04-16   911  	xfs_fsblock_t	sumbno;		/* summary block number */
65eed012d1f2d0 Omar Sandoval       2018-12-21   912  	uint8_t		*rsum_cache;	/* old summary cache */
^1da177e4c3f41 Linus Torvalds      2005-04-16   913  
^1da177e4c3f41 Linus Torvalds      2005-04-16   914  	sbp = &mp->m_sb;
^1da177e4c3f41 Linus Torvalds      2005-04-16   915  	/*
^1da177e4c3f41 Linus Torvalds      2005-04-16   916  	 * Initial error checking.
^1da177e4c3f41 Linus Torvalds      2005-04-16   917  	 */
743bb4650da9e2 sandeen@...deen.net 2008-11-25   918  	if (!capable(CAP_SYS_ADMIN))
2451337dd04390 Dave Chinner        2014-06-25   919  		return -EPERM;
73024cf11522c0 Eric Sesterhenn     2006-06-28   920  	if (mp->m_rtdev_targp == NULL || mp->m_rbmip == NULL ||
^1da177e4c3f41 Linus Torvalds      2005-04-16   921  	    (nrblocks = in->newblocks) <= sbp->sb_rblocks ||
^1da177e4c3f41 Linus Torvalds      2005-04-16   922  	    (sbp->sb_rblocks && (in->extsize != sbp->sb_rextsize)))
2451337dd04390 Dave Chinner        2014-06-25   923  		return -EINVAL;
4cc929ee305c69 Nathan Scott        2007-05-14   924  	if ((error = xfs_sb_validate_fsb_count(sbp, nrblocks)))
4cc929ee305c69 Nathan Scott        2007-05-14   925  		return error;
^1da177e4c3f41 Linus Torvalds      2005-04-16   926  	/*
^1da177e4c3f41 Linus Torvalds      2005-04-16   927  	 * Read in the last block of the device, make sure it exists.
^1da177e4c3f41 Linus Torvalds      2005-04-16   928  	 */
ba3726742c1712 Dave Chinner        2014-10-02   929  	error = xfs_buf_read_uncached(mp->m_rtdev_targp,
4cc929ee305c69 Nathan Scott        2007-05-14   930  				XFS_FSB_TO_BB(mp, nrblocks - 1),
ba3726742c1712 Dave Chinner        2014-10-02   931  				XFS_FSB_TO_BB(mp, 1), 0, &bp, NULL);
ba3726742c1712 Dave Chinner        2014-10-02   932  	if (error)
eab4e63368b4cf Dave Chinner        2012-11-12   933  		return error;
^1da177e4c3f41 Linus Torvalds      2005-04-16   934  	xfs_buf_relse(bp);
1922c949c59f93 Dave Chinner        2010-09-22   935  
^1da177e4c3f41 Linus Torvalds      2005-04-16   936  	/*
^1da177e4c3f41 Linus Torvalds      2005-04-16   937  	 * Calculate new parameters.  These are the final values to be reached.
^1da177e4c3f41 Linus Torvalds      2005-04-16   938  	 */
^1da177e4c3f41 Linus Torvalds      2005-04-16   939  	nrextents = nrblocks;
^1da177e4c3f41 Linus Torvalds      2005-04-16   940  	do_div(nrextents, in->extsize);
68c3271515f11f Nathan Scott        2006-09-28   941  	nrbmblocks = howmany_64(nrextents, NBBY * sbp->sb_blocksize);
^1da177e4c3f41 Linus Torvalds      2005-04-16   942  	nrextslog = xfs_highbit32(nrextents);
^1da177e4c3f41 Linus Torvalds      2005-04-16   943  	nrsumlevels = nrextslog + 1;
^1da177e4c3f41 Linus Torvalds      2005-04-16   944  	nrsumsize = (uint)sizeof(xfs_suminfo_t) * nrsumlevels * nrbmblocks;
^1da177e4c3f41 Linus Torvalds      2005-04-16   945  	nrsumblocks = XFS_B_TO_FSB(mp, nrsumsize);
^1da177e4c3f41 Linus Torvalds      2005-04-16   946  	nrsumsize = XFS_FSB_TO_B(mp, nrsumblocks);
^1da177e4c3f41 Linus Torvalds      2005-04-16   947  	/*
^1da177e4c3f41 Linus Torvalds      2005-04-16   948  	 * New summary size can't be more than half the size of
^1da177e4c3f41 Linus Torvalds      2005-04-16   949  	 * the log.  This prevents us from getting a log overflow,
^1da177e4c3f41 Linus Torvalds      2005-04-16   950  	 * since we'll log basically the whole summary file at once.
^1da177e4c3f41 Linus Torvalds      2005-04-16   951  	 */
^1da177e4c3f41 Linus Torvalds      2005-04-16   952  	if (nrsumblocks > (mp->m_sb.sb_logblocks >> 1))
2451337dd04390 Dave Chinner        2014-06-25   953  		return -EINVAL;
^1da177e4c3f41 Linus Torvalds      2005-04-16   954  	/*
^1da177e4c3f41 Linus Torvalds      2005-04-16   955  	 * Get the old block counts for bitmap and summary inodes.
^1da177e4c3f41 Linus Torvalds      2005-04-16   956  	 * These can't change since other growfs callers are locked out.
^1da177e4c3f41 Linus Torvalds      2005-04-16   957  	 */
^1da177e4c3f41 Linus Torvalds      2005-04-16   958  	rbmblocks = XFS_B_TO_FSB(mp, mp->m_rbmip->i_d.di_size);
^1da177e4c3f41 Linus Torvalds      2005-04-16   959  	rsumblocks = XFS_B_TO_FSB(mp, mp->m_rsumip->i_d.di_size);
^1da177e4c3f41 Linus Torvalds      2005-04-16   960  	/*
^1da177e4c3f41 Linus Torvalds      2005-04-16   961  	 * Allocate space to the bitmap and summary files, as necessary.
^1da177e4c3f41 Linus Torvalds      2005-04-16   962  	 */
1050c71e2925ab Christoph Hellwig   2011-02-13   963  	error = xfs_growfs_rt_alloc(mp, rbmblocks, nrbmblocks, mp->m_rbmip);
1050c71e2925ab Christoph Hellwig   2011-02-13   964  	if (error)
^1da177e4c3f41 Linus Torvalds      2005-04-16   965  		return error;
1050c71e2925ab Christoph Hellwig   2011-02-13   966  	error = xfs_growfs_rt_alloc(mp, rsumblocks, nrsumblocks, mp->m_rsumip);
1050c71e2925ab Christoph Hellwig   2011-02-13   967  	if (error)
^1da177e4c3f41 Linus Torvalds      2005-04-16   968  		return error;
65eed012d1f2d0 Omar Sandoval       2018-12-21   969  
65eed012d1f2d0 Omar Sandoval       2018-12-21   970  	rsum_cache = mp->m_rsum_cache;
65eed012d1f2d0 Omar Sandoval       2018-12-21   971  	if (nrbmblocks != sbp->sb_rbmblocks)
65eed012d1f2d0 Omar Sandoval       2018-12-21   972  		xfs_alloc_rsum_cache(mp, nrbmblocks);
65eed012d1f2d0 Omar Sandoval       2018-12-21   973  
d432c80e68e3c2 Nathan Scott        2006-09-28   974  	/*
d432c80e68e3c2 Nathan Scott        2006-09-28   975  	 * Allocate a new (fake) mount/sb.
d432c80e68e3c2 Nathan Scott        2006-09-28   976  	 */
707e0ddaf67e89 Tetsuo Handa        2019-08-26   977  	nmp = kmem_alloc(sizeof(*nmp), 0);
^1da177e4c3f41 Linus Torvalds      2005-04-16   978  	/*
^1da177e4c3f41 Linus Torvalds      2005-04-16   979  	 * Loop over the bitmap blocks.
^1da177e4c3f41 Linus Torvalds      2005-04-16   980  	 * We will do everything one bitmap block at a time.
^1da177e4c3f41 Linus Torvalds      2005-04-16   981  	 * Skip the current block if it is exactly full.
^1da177e4c3f41 Linus Torvalds      2005-04-16   982  	 * This also deals with the case where there were no rtextents before.
^1da177e4c3f41 Linus Torvalds      2005-04-16   983  	 */
^1da177e4c3f41 Linus Torvalds      2005-04-16   984  	for (bmbno = sbp->sb_rbmblocks -
^1da177e4c3f41 Linus Torvalds      2005-04-16   985  		     ((sbp->sb_rextents & ((1 << mp->m_blkbit_log) - 1)) != 0);
^1da177e4c3f41 Linus Torvalds      2005-04-16   986  	     bmbno < nrbmblocks;
^1da177e4c3f41 Linus Torvalds      2005-04-16   987  	     bmbno++) {
0924b585fc49bf Dave Chinner        2008-11-28   988  		xfs_trans_t	*tp;
0924b585fc49bf Dave Chinner        2008-11-28   989  
^1da177e4c3f41 Linus Torvalds      2005-04-16   990  		*nmp = *mp;
^1da177e4c3f41 Linus Torvalds      2005-04-16   991  		nsbp = &nmp->m_sb;
^1da177e4c3f41 Linus Torvalds      2005-04-16   992  		/*
^1da177e4c3f41 Linus Torvalds      2005-04-16   993  		 * Calculate new sb and mount fields for this round.
^1da177e4c3f41 Linus Torvalds      2005-04-16   994  		 */
^1da177e4c3f41 Linus Torvalds      2005-04-16   995  		nsbp->sb_rextsize = in->extsize;
^1da177e4c3f41 Linus Torvalds      2005-04-16   996  		nsbp->sb_rbmblocks = bmbno + 1;
^1da177e4c3f41 Linus Torvalds      2005-04-16   997  		nsbp->sb_rblocks =
^1da177e4c3f41 Linus Torvalds      2005-04-16   998  			XFS_RTMIN(nrblocks,
^1da177e4c3f41 Linus Torvalds      2005-04-16   999  				  nsbp->sb_rbmblocks * NBBY *
^1da177e4c3f41 Linus Torvalds      2005-04-16  1000  				  nsbp->sb_blocksize * nsbp->sb_rextsize);
^1da177e4c3f41 Linus Torvalds      2005-04-16  1001  		nsbp->sb_rextents = nsbp->sb_rblocks;
^1da177e4c3f41 Linus Torvalds      2005-04-16  1002  		do_div(nsbp->sb_rextents, nsbp->sb_rextsize);
79071eb0b2f142 David Chinner       2008-08-13  1003  		ASSERT(nsbp->sb_rextents != 0);
^1da177e4c3f41 Linus Torvalds      2005-04-16  1004  		nsbp->sb_rextslog = xfs_highbit32(nsbp->sb_rextents);
^1da177e4c3f41 Linus Torvalds      2005-04-16  1005  		nrsumlevels = nmp->m_rsumlevels = nsbp->sb_rextslog + 1;
^1da177e4c3f41 Linus Torvalds      2005-04-16  1006  		nrsumsize =
^1da177e4c3f41 Linus Torvalds      2005-04-16  1007  			(uint)sizeof(xfs_suminfo_t) * nrsumlevels *
^1da177e4c3f41 Linus Torvalds      2005-04-16  1008  			nsbp->sb_rbmblocks;
^1da177e4c3f41 Linus Torvalds      2005-04-16  1009  		nrsumblocks = XFS_B_TO_FSB(mp, nrsumsize);
^1da177e4c3f41 Linus Torvalds      2005-04-16  1010  		nmp->m_rsumsize = nrsumsize = XFS_FSB_TO_B(mp, nrsumblocks);
^1da177e4c3f41 Linus Torvalds      2005-04-16  1011  		/*
^1da177e4c3f41 Linus Torvalds      2005-04-16  1012  		 * Start a transaction, get the log reservation.
^1da177e4c3f41 Linus Torvalds      2005-04-16  1013  		 */
253f4911f297b8 Christoph Hellwig   2016-04-06  1014  		error = xfs_trans_alloc(mp, &M_RES(mp)->tr_growrtfree, 0, 0, 0,
253f4911f297b8 Christoph Hellwig   2016-04-06  1015  				&tp);
3d3c8b5222b924 Jie Liu             2013-08-12  1016  		if (error)
253f4911f297b8 Christoph Hellwig   2016-04-06  1017  			break;
^1da177e4c3f41 Linus Torvalds      2005-04-16  1018  		/*
^1da177e4c3f41 Linus Torvalds      2005-04-16  1019  		 * Lock out other callers by grabbing the bitmap inode lock.
^1da177e4c3f41 Linus Torvalds      2005-04-16  1020  		 */
1050c71e2925ab Christoph Hellwig   2011-02-13  1021  		xfs_ilock(mp->m_rbmip, XFS_ILOCK_EXCL);
ddc3415aba1cb2 Christoph Hellwig   2011-09-19  1022  		xfs_trans_ijoin(tp, mp->m_rbmip, XFS_ILOCK_EXCL);
^1da177e4c3f41 Linus Torvalds      2005-04-16  1023  		/*
b2844ba3d37cba Darrick J. Wong     2020-10-07  1024  		 * Update the bitmap inode's size ondisk and incore.  We need
b2844ba3d37cba Darrick J. Wong     2020-10-07  1025  		 * to update the incore size so that inode inactivation won't
b2844ba3d37cba Darrick J. Wong     2020-10-07  1026  		 * punch what it thinks are "posteof" blocks.
^1da177e4c3f41 Linus Torvalds      2005-04-16  1027  		 */
^1da177e4c3f41 Linus Torvalds      2005-04-16  1028  		mp->m_rbmip->i_d.di_size =
^1da177e4c3f41 Linus Torvalds      2005-04-16  1029  			nsbp->sb_rbmblocks * nsbp->sb_blocksize;
b2844ba3d37cba Darrick J. Wong     2020-10-07  1030  		i_size_write(VFS_I(mp->m_rbmip), mp->m_rbmip->i_d.di_size);
^1da177e4c3f41 Linus Torvalds      2005-04-16  1031  		xfs_trans_log_inode(tp, mp->m_rbmip, XFS_ILOG_CORE);
^1da177e4c3f41 Linus Torvalds      2005-04-16  1032  		/*
^1da177e4c3f41 Linus Torvalds      2005-04-16  1033  		 * Get the summary inode into the transaction.
^1da177e4c3f41 Linus Torvalds      2005-04-16  1034  		 */
1050c71e2925ab Christoph Hellwig   2011-02-13  1035  		xfs_ilock(mp->m_rsumip, XFS_ILOCK_EXCL);
ddc3415aba1cb2 Christoph Hellwig   2011-09-19  1036  		xfs_trans_ijoin(tp, mp->m_rsumip, XFS_ILOCK_EXCL);
^1da177e4c3f41 Linus Torvalds      2005-04-16  1037  		/*
b2844ba3d37cba Darrick J. Wong     2020-10-07  1038  		 * Update the summary inode's size.  We need to update the
b2844ba3d37cba Darrick J. Wong     2020-10-07  1039  		 * incore size so that inode inactivation won't punch what it
b2844ba3d37cba Darrick J. Wong     2020-10-07  1040  		 * thinks are "posteof" blocks.
^1da177e4c3f41 Linus Torvalds      2005-04-16  1041  		 */
^1da177e4c3f41 Linus Torvalds      2005-04-16  1042  		mp->m_rsumip->i_d.di_size = nmp->m_rsumsize;
b2844ba3d37cba Darrick J. Wong     2020-10-07  1043  		i_size_write(VFS_I(mp->m_rsumip), mp->m_rsumip->i_d.di_size);
^1da177e4c3f41 Linus Torvalds      2005-04-16  1044  		xfs_trans_log_inode(tp, mp->m_rsumip, XFS_ILOG_CORE);
^1da177e4c3f41 Linus Torvalds      2005-04-16  1045  		/*
^1da177e4c3f41 Linus Torvalds      2005-04-16  1046  		 * Copy summary data from old to new sizes.
^1da177e4c3f41 Linus Torvalds      2005-04-16  1047  		 * Do this when the real size (not block-aligned) changes.
^1da177e4c3f41 Linus Torvalds      2005-04-16  1048  		 */
^1da177e4c3f41 Linus Torvalds      2005-04-16  1049  		if (sbp->sb_rbmblocks != nsbp->sb_rbmblocks ||
^1da177e4c3f41 Linus Torvalds      2005-04-16  1050  		    mp->m_rsumlevels != nmp->m_rsumlevels) {
^1da177e4c3f41 Linus Torvalds      2005-04-16  1051  			error = xfs_rtcopy_summary(mp, nmp, tp);
^1da177e4c3f41 Linus Torvalds      2005-04-16  1052  			if (error)
0924b585fc49bf Dave Chinner        2008-11-28  1053  				goto error_cancel;
^1da177e4c3f41 Linus Torvalds      2005-04-16  1054  		}
^1da177e4c3f41 Linus Torvalds      2005-04-16  1055  		/*
^1da177e4c3f41 Linus Torvalds      2005-04-16  1056  		 * Update superblock fields.
^1da177e4c3f41 Linus Torvalds      2005-04-16  1057  		 */
^1da177e4c3f41 Linus Torvalds      2005-04-16  1058  		if (nsbp->sb_rextsize != sbp->sb_rextsize)
^1da177e4c3f41 Linus Torvalds      2005-04-16  1059  			xfs_trans_mod_sb(tp, XFS_TRANS_SB_REXTSIZE,
^1da177e4c3f41 Linus Torvalds      2005-04-16  1060  				nsbp->sb_rextsize - sbp->sb_rextsize);
^1da177e4c3f41 Linus Torvalds      2005-04-16  1061  		if (nsbp->sb_rbmblocks != sbp->sb_rbmblocks)
^1da177e4c3f41 Linus Torvalds      2005-04-16  1062  			xfs_trans_mod_sb(tp, XFS_TRANS_SB_RBMBLOCKS,
^1da177e4c3f41 Linus Torvalds      2005-04-16  1063  				nsbp->sb_rbmblocks - sbp->sb_rbmblocks);
^1da177e4c3f41 Linus Torvalds      2005-04-16  1064  		if (nsbp->sb_rblocks != sbp->sb_rblocks)
^1da177e4c3f41 Linus Torvalds      2005-04-16  1065  			xfs_trans_mod_sb(tp, XFS_TRANS_SB_RBLOCKS,
^1da177e4c3f41 Linus Torvalds      2005-04-16  1066  				nsbp->sb_rblocks - sbp->sb_rblocks);
^1da177e4c3f41 Linus Torvalds      2005-04-16  1067  		if (nsbp->sb_rextents != sbp->sb_rextents)
^1da177e4c3f41 Linus Torvalds      2005-04-16  1068  			xfs_trans_mod_sb(tp, XFS_TRANS_SB_REXTENTS,
^1da177e4c3f41 Linus Torvalds      2005-04-16  1069  				nsbp->sb_rextents - sbp->sb_rextents);
^1da177e4c3f41 Linus Torvalds      2005-04-16  1070  		if (nsbp->sb_rextslog != sbp->sb_rextslog)
^1da177e4c3f41 Linus Torvalds      2005-04-16  1071  			xfs_trans_mod_sb(tp, XFS_TRANS_SB_REXTSLOG,
^1da177e4c3f41 Linus Torvalds      2005-04-16  1072  				nsbp->sb_rextslog - sbp->sb_rextslog);
^1da177e4c3f41 Linus Torvalds      2005-04-16  1073  		/*
^1da177e4c3f41 Linus Torvalds      2005-04-16  1074  		 * Free new extent.
^1da177e4c3f41 Linus Torvalds      2005-04-16  1075  		 */
^1da177e4c3f41 Linus Torvalds      2005-04-16  1076  		bp = NULL;
^1da177e4c3f41 Linus Torvalds      2005-04-16  1077  		error = xfs_rtfree_range(nmp, tp, sbp->sb_rextents,
^1da177e4c3f41 Linus Torvalds      2005-04-16  1078  			nsbp->sb_rextents - sbp->sb_rextents, &bp, &sumbno);
0924b585fc49bf Dave Chinner        2008-11-28  1079  		if (error) {
0924b585fc49bf Dave Chinner        2008-11-28  1080  error_cancel:
4906e21545814e Christoph Hellwig   2015-06-04  1081  			xfs_trans_cancel(tp);
d432c80e68e3c2 Nathan Scott        2006-09-28  1082  			break;
0924b585fc49bf Dave Chinner        2008-11-28  1083  		}
^1da177e4c3f41 Linus Torvalds      2005-04-16  1084  		/*
^1da177e4c3f41 Linus Torvalds      2005-04-16  1085  		 * Mark more blocks free in the superblock.
^1da177e4c3f41 Linus Torvalds      2005-04-16  1086  		 */
^1da177e4c3f41 Linus Torvalds      2005-04-16  1087  		xfs_trans_mod_sb(tp, XFS_TRANS_SB_FREXTENTS,
^1da177e4c3f41 Linus Torvalds      2005-04-16  1088  			nsbp->sb_rextents - sbp->sb_rextents);
^1da177e4c3f41 Linus Torvalds      2005-04-16  1089  		/*
^1da177e4c3f41 Linus Torvalds      2005-04-16  1090  		 * Update mp values into the real mp structure.
^1da177e4c3f41 Linus Torvalds      2005-04-16  1091  		 */
^1da177e4c3f41 Linus Torvalds      2005-04-16  1092  		mp->m_rsumlevels = nrsumlevels;
^1da177e4c3f41 Linus Torvalds      2005-04-16  1093  		mp->m_rsumsize = nrsumsize;
e5720eec0548c0 David Chinner       2008-04-10  1094  
70393313dd0b26 Christoph Hellwig   2015-06-04  1095  		error = xfs_trans_commit(tp);
0924b585fc49bf Dave Chinner        2008-11-28  1096  		if (error)
e5720eec0548c0 David Chinner       2008-04-10  1097  			break;
e5720eec0548c0 David Chinner       2008-04-10  1098  	}
^1da177e4c3f41 Linus Torvalds      2005-04-16  1099  
^1da177e4c3f41 Linus Torvalds      2005-04-16  1100  	/*
d432c80e68e3c2 Nathan Scott        2006-09-28  1101  	 * Free the fake mp structure.
^1da177e4c3f41 Linus Torvalds      2005-04-16  1102  	 */
f0e2d93c29dc39 Denys Vlasenko      2008-05-19  1103  	kmem_free(nmp);
d432c80e68e3c2 Nathan Scott        2006-09-28  1104  
65eed012d1f2d0 Omar Sandoval       2018-12-21  1105  	/*
65eed012d1f2d0 Omar Sandoval       2018-12-21  1106  	 * If we had to allocate a new rsum_cache, we either need to free the
65eed012d1f2d0 Omar Sandoval       2018-12-21  1107  	 * old one (if we succeeded) or free the new one and restore the old one
65eed012d1f2d0 Omar Sandoval       2018-12-21  1108  	 * (if there was an error).
65eed012d1f2d0 Omar Sandoval       2018-12-21  1109  	 */
65eed012d1f2d0 Omar Sandoval       2018-12-21  1110  	if (rsum_cache != mp->m_rsum_cache) {
65eed012d1f2d0 Omar Sandoval       2018-12-21  1111  		if (error) {
65eed012d1f2d0 Omar Sandoval       2018-12-21  1112  			kmem_free(mp->m_rsum_cache);
65eed012d1f2d0 Omar Sandoval       2018-12-21  1113  			mp->m_rsum_cache = rsum_cache;
65eed012d1f2d0 Omar Sandoval       2018-12-21  1114  		} else {
65eed012d1f2d0 Omar Sandoval       2018-12-21  1115  			kmem_free(rsum_cache);
65eed012d1f2d0 Omar Sandoval       2018-12-21  1116  		}
65eed012d1f2d0 Omar Sandoval       2018-12-21  1117  	}
65eed012d1f2d0 Omar Sandoval       2018-12-21  1118  
^1da177e4c3f41 Linus Torvalds      2005-04-16  1119  	return error;
^1da177e4c3f41 Linus Torvalds      2005-04-16  1120  }
^1da177e4c3f41 Linus Torvalds      2005-04-16  1121  

:::::: The code at line 892 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@...970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@...970.osdl.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (25215 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ