aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dir2_block.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2013-10-29 07:11:47 -0400
committerBen Myers <bpm@sgi.com>2013-10-30 14:38:59 -0400
commit4740175e75f70ab71f76ae98ab00f7db731a48f7 (patch)
tree716ca450f8fc545b6dd14d8052a81d6d440a7f16 /fs/xfs/xfs_dir2_block.c
parent32c5483a8a13a43264809144210ec114dd70b611 (diff)
xfs: vectorise remaining shortform dir2 ops
Following from the initial patch to introduce the directory operations vector, convert the rest of the shortform directory operations to use vectored ops rather than superblock feature checks. This further reduces the size of the built binary: text data bss dec hex filename 794490 96802 1096 892388 d9de4 fs/xfs/xfs.o.orig 792986 96802 1096 890884 d9804 fs/xfs/xfs.o.p1 792350 96802 1096 890248 d9588 fs/xfs/xfs.o.p2 Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_dir2_block.c')
-rw-r--r--fs/xfs/xfs_dir2_block.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/xfs_dir2_block.c b/fs/xfs/xfs_dir2_block.c
index 9d86b6f9e80f..960f3ab526f6 100644
--- a/fs/xfs/xfs_dir2_block.c
+++ b/fs/xfs/xfs_dir2_block.c
@@ -1173,7 +1173,7 @@ xfs_dir2_sf_to_block(
1173 * Create entry for .. 1173 * Create entry for ..
1174 */ 1174 */
1175 dep = xfs_dir3_data_dotdot_entry_p(mp, hdr); 1175 dep = xfs_dir3_data_dotdot_entry_p(mp, hdr);
1176 dep->inumber = cpu_to_be64(xfs_dir2_sf_get_parent_ino(sfp)); 1176 dep->inumber = cpu_to_be64(dp->d_ops->sf_get_parent_ino(sfp));
1177 dep->namelen = 2; 1177 dep->namelen = 2;
1178 dep->name[0] = dep->name[1] = '.'; 1178 dep->name[0] = dep->name[1] = '.';
1179 xfs_dir3_dirent_put_ftype(mp, dep, XFS_DIR3_FT_DIR); 1179 xfs_dir3_dirent_put_ftype(mp, dep, XFS_DIR3_FT_DIR);
@@ -1222,10 +1222,10 @@ xfs_dir2_sf_to_block(
1222 * Copy a real entry. 1222 * Copy a real entry.
1223 */ 1223 */
1224 dep = (xfs_dir2_data_entry_t *)((char *)hdr + newoffset); 1224 dep = (xfs_dir2_data_entry_t *)((char *)hdr + newoffset);
1225 dep->inumber = cpu_to_be64(xfs_dir3_sfe_get_ino(mp, sfp, sfep)); 1225 dep->inumber = cpu_to_be64(dp->d_ops->sf_get_ino(sfp, sfep));
1226 dep->namelen = sfep->namelen; 1226 dep->namelen = sfep->namelen;
1227 xfs_dir3_dirent_put_ftype(mp, dep, 1227 xfs_dir3_dirent_put_ftype(mp, dep,
1228 xfs_dir3_sfe_get_ftype(mp, sfp, sfep)); 1228 dp->d_ops->sf_get_ftype(sfep));
1229 memcpy(dep->name, sfep->name, dep->namelen); 1229 memcpy(dep->name, sfep->name, dep->namelen);
1230 tagp = xfs_dir3_data_entry_tag_p(mp, dep); 1230 tagp = xfs_dir3_data_entry_tag_p(mp, dep);
1231 *tagp = cpu_to_be16((char *)dep - (char *)hdr); 1231 *tagp = cpu_to_be16((char *)dep - (char *)hdr);