[XFS] stop updating inode->i_blocks

The VFS doesn't use i_blocks, it's only used by generic_fillattr and the
generic quota code which XFS doesn't use. In XFS there is one use to check
whether we have an inline or out of line sumlink, but we can replace that
with a check of the XFS_IFINLINE inode flag.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:30391a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>

authored by Christoph Hellwig and committed by Lachlan McIlroy 222096ae de08dbc1

+1 -14
-3
fs/xfs/linux-2.6/xfs_iops.c
··· 202 202 loff_t size; 203 203 204 204 inode->i_nlink = ip->i_d.di_nlink; 205 - inode->i_blocks = 206 - XFS_FSB_TO_BB(ip->i_mount, ip->i_d.di_nblocks + 207 - ip->i_delayed_blks); 208 205 /* we're under i_sem so i_size can't change under us */ 209 206 size = XFS_ISIZE(ip); 210 207 if (i_size_read(inode) != size)
+1 -3
fs/xfs/linux-2.6/xfs_super.c
··· 569 569 break; 570 570 case S_IFLNK: 571 571 inode->i_op = &xfs_symlink_inode_operations; 572 - if (inode->i_blocks) 572 + if (!(XFS_I(inode)->i_df.if_flags & XFS_IFINLINE)) 573 573 inode->i_mapping->a_ops = &xfs_address_space_operations; 574 574 break; 575 575 default: ··· 606 606 607 607 inode->i_generation = ip->i_d.di_gen; 608 608 i_size_write(inode, ip->i_d.di_size); 609 - inode->i_blocks = 610 - XFS_FSB_TO_BB(mp, ip->i_d.di_nblocks + ip->i_delayed_blks); 611 609 inode->i_atime.tv_sec = ip->i_d.di_atime.t_sec; 612 610 inode->i_atime.tv_nsec = ip->i_d.di_atime.t_nsec; 613 611 inode->i_mtime.tv_sec = ip->i_d.di_mtime.t_sec;
-2
fs/xfs/linux-2.6/xfs_vnode.c
··· 106 106 inode->i_nlink = ip->i_d.di_nlink; 107 107 inode->i_uid = ip->i_d.di_uid; 108 108 inode->i_gid = ip->i_d.di_gid; 109 - inode->i_blocks = 110 - XFS_FSB_TO_BB(mp, ip->i_d.di_nblocks + ip->i_delayed_blks); 111 109 inode->i_mtime.tv_sec = ip->i_d.di_mtime.t_sec; 112 110 inode->i_mtime.tv_nsec = ip->i_d.di_mtime.t_nsec; 113 111 inode->i_ctime.tv_sec = ip->i_d.di_ctime.t_sec;
-6
fs/xfs/xfs_vnodeops.c
··· 1536 1536 error = xfs_free_eofblocks(mp, ip, XFS_FREE_EOF_LOCK); 1537 1537 if (error) 1538 1538 return error; 1539 - /* Update linux inode block count after free above */ 1540 - vn_to_inode(vp)->i_blocks = XFS_FSB_TO_BB(mp, 1541 - ip->i_d.di_nblocks + ip->i_delayed_blks); 1542 1539 } 1543 1540 } 1544 1541 ··· 1609 1612 error = xfs_free_eofblocks(mp, ip, XFS_FREE_EOF_LOCK); 1610 1613 if (error) 1611 1614 return VN_INACTIVE_CACHE; 1612 - /* Update linux inode block count after free above */ 1613 - vn_to_inode(vp)->i_blocks = XFS_FSB_TO_BB(mp, 1614 - ip->i_d.di_nblocks + ip->i_delayed_blks); 1615 1615 } 1616 1616 goto out; 1617 1617 }