aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r--fs/xfs/xfs_inode.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index e486c7d244c2..0063437f291a 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -1777,22 +1777,19 @@ xfs_igrow_start(
1777 xfs_fsize_t new_size, 1777 xfs_fsize_t new_size,
1778 cred_t *credp) 1778 cred_t *credp)
1779{ 1779{
1780 xfs_fsize_t isize;
1781 int error; 1780 int error;
1782 1781
1783 ASSERT(ismrlocked(&(ip->i_lock), MR_UPDATE) != 0); 1782 ASSERT(ismrlocked(&(ip->i_lock), MR_UPDATE) != 0);
1784 ASSERT(ismrlocked(&(ip->i_iolock), MR_UPDATE) != 0); 1783 ASSERT(ismrlocked(&(ip->i_iolock), MR_UPDATE) != 0);
1785 ASSERT(new_size > ip->i_d.di_size); 1784 ASSERT(new_size > ip->i_d.di_size);
1786 1785
1787 error = 0;
1788 isize = ip->i_d.di_size;
1789 /* 1786 /*
1790 * Zero any pages that may have been created by 1787 * Zero any pages that may have been created by
1791 * xfs_write_file() beyond the end of the file 1788 * xfs_write_file() beyond the end of the file
1792 * and any blocks between the old and new file sizes. 1789 * and any blocks between the old and new file sizes.
1793 */ 1790 */
1794 error = xfs_zero_eof(XFS_ITOV(ip), &ip->i_iocore, new_size, isize, 1791 error = xfs_zero_eof(XFS_ITOV(ip), &ip->i_iocore, new_size,
1795 new_size); 1792 ip->i_d.di_size, new_size);
1796 return error; 1793 return error;
1797} 1794}
1798 1795