diff options
author | Christoph Hellwig <hch@infradead.org> | 2008-05-19 21:30:46 -0400 |
---|---|---|
committer | Niv Sardi <xaiki@debian.org> | 2008-07-28 02:58:18 -0400 |
commit | 61436febae29085bffc7c291db03cbd709dc68a3 (patch) | |
tree | e2cff92f885294be68326752029febb9fbef8bce /fs/xfs/xfs_inode.c | |
parent | 48b62a1a97f118a5a71ae9222bc6d3481d6b757b (diff) |
[XFS] kill xfs_igrow_start and xfs_igrow_finish
xfs_igrow_start just expands to xfs_zero_eof with two asserts that are
useless in the context of the only caller and some rather confusing
comments.
xfs_igrow_finish is just a few lines of code decorated again with useless
asserts and confusing comments.
Just kill those two and merge them into xfs_setattr.
SGI-PV: 981498
SGI-Modid: xfs-linux-melb:xfs-kern:31186a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r-- | fs/xfs/xfs_inode.c | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index 4b21490334b1..199a36ac8e2d 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
@@ -1763,67 +1763,6 @@ xfs_itruncate_finish( | |||
1763 | return 0; | 1763 | return 0; |
1764 | } | 1764 | } |
1765 | 1765 | ||
1766 | |||
1767 | /* | ||
1768 | * xfs_igrow_start | ||
1769 | * | ||
1770 | * Do the first part of growing a file: zero any data in the last | ||
1771 | * block that is beyond the old EOF. We need to do this before | ||
1772 | * the inode is joined to the transaction to modify the i_size. | ||
1773 | * That way we can drop the inode lock and call into the buffer | ||
1774 | * cache to get the buffer mapping the EOF. | ||
1775 | */ | ||
1776 | int | ||
1777 | xfs_igrow_start( | ||
1778 | xfs_inode_t *ip, | ||
1779 | xfs_fsize_t new_size, | ||
1780 | cred_t *credp) | ||
1781 | { | ||
1782 | ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL|XFS_IOLOCK_EXCL)); | ||
1783 | ASSERT(new_size > ip->i_size); | ||
1784 | |||
1785 | /* | ||
1786 | * Zero any pages that may have been created by | ||
1787 | * xfs_write_file() beyond the end of the file | ||
1788 | * and any blocks between the old and new file sizes. | ||
1789 | */ | ||
1790 | return xfs_zero_eof(ip, new_size, ip->i_size); | ||
1791 | } | ||
1792 | |||
1793 | /* | ||
1794 | * xfs_igrow_finish | ||
1795 | * | ||
1796 | * This routine is called to extend the size of a file. | ||
1797 | * The inode must have both the iolock and the ilock locked | ||
1798 | * for update and it must be a part of the current transaction. | ||
1799 | * The xfs_igrow_start() function must have been called previously. | ||
1800 | * If the change_flag is not zero, the inode change timestamp will | ||
1801 | * be updated. | ||
1802 | */ | ||
1803 | void | ||
1804 | xfs_igrow_finish( | ||
1805 | xfs_trans_t *tp, | ||
1806 | xfs_inode_t *ip, | ||
1807 | xfs_fsize_t new_size, | ||
1808 | int change_flag) | ||
1809 | { | ||
1810 | ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL|XFS_IOLOCK_EXCL)); | ||
1811 | ASSERT(ip->i_transp == tp); | ||
1812 | ASSERT(new_size > ip->i_size); | ||
1813 | |||
1814 | /* | ||
1815 | * Update the file size. Update the inode change timestamp | ||
1816 | * if change_flag set. | ||
1817 | */ | ||
1818 | ip->i_d.di_size = new_size; | ||
1819 | ip->i_size = new_size; | ||
1820 | if (change_flag) | ||
1821 | xfs_ichgtime(ip, XFS_ICHGTIME_CHG); | ||
1822 | xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); | ||
1823 | |||
1824 | } | ||
1825 | |||
1826 | |||
1827 | /* | 1766 | /* |
1828 | * This is called when the inode's link count goes to 0. | 1767 | * This is called when the inode's link count goes to 0. |
1829 | * We place the on-disk inode on a list in the AGI. It | 1768 | * We place the on-disk inode on a list in the AGI. It |