From 4141956ae05e0685b14b30f92fdc8fb11b4a0cb2 Mon Sep 17 00:00:00 2001 From: Dave Chinner Date: Tue, 29 Oct 2013 22:11:50 +1100 Subject: xfs: vectorise directory leaf operations Next step in the vectorisation process is the leaf block encode/decode operations. Most of the operations on leaves are handled by the data block vectors, so there are relatively few of them here. Because of all the shuffling of code and having to pass more state to some functions, this patch doesn't directly reduce the size of the binary. It does open up many more opportunities for factoring and optimisation, however. 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 789293 96802 1096 887191 d8997 fs/xfs/xfs.o.p3 789005 96802 1096 886903 d8997 fs/xfs/xfs.o.p4 789061 96802 1096 886959 d88af fs/xfs/xfs.o.p5 Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Ben Myers --- fs/xfs/xfs_dir2.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'fs/xfs/xfs_dir2.c') diff --git a/fs/xfs/xfs_dir2.c b/fs/xfs/xfs_dir2.c index 7911136453cd..2b98a33ca383 100644 --- a/fs/xfs/xfs_dir2.c +++ b/fs/xfs/xfs_dir2.c @@ -113,12 +113,7 @@ xfs_dir_mount( else mp->m_dirnameops = &xfs_default_nameops; - if (xfs_sb_version_hascrc(&mp->m_sb)) - mp->m_dir_inode_ops = &xfs_dir3_ops; - else if (xfs_sb_version_hasftype(&mp->m_sb)) - mp->m_dir_inode_ops = &xfs_dir2_ftype_ops; - else - mp->m_dir_inode_ops = &xfs_dir2_ops; + mp->m_dir_inode_ops = xfs_dir_get_ops(mp, NULL); } /* -- cgit v1.2.3