diff options
author | Dave Chinner | 2013-08-12 20:49:36 +1000 |
---|---|---|
committer | Ben Myers | 2013-08-12 16:39:56 -0500 |
commit | 4a8af273de63d9656559ba5289e91f40aae0441f (patch) | |
tree | ac3d22e894df58c38326bada04073d283c90dee5 /fs/xfs/xfs_dir2.c | |
parent | 1fd7115eda5661e872463694fc4a12821c4f914a (diff) |
xfs: move getdents code into it's own file
The directory readdir code is not used by userspace, but it is
intermingled with files that are shared with userspace. This makes
it difficult to compare the differences between the userspac eand
kernel files are the userspace files don't have the getdents code in
them. Move all the kernel getdents code to a separate file to bring
the shared content between userspace and kernel files closer
together.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_dir2.c')
-rw-r--r-- | fs/xfs/xfs_dir2.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/fs/xfs/xfs_dir2.c b/fs/xfs/xfs_dir2.c index 8f023dee404d..431be441347f 100644 --- a/fs/xfs/xfs_dir2.c +++ b/fs/xfs/xfs_dir2.c @@ -363,37 +363,6 @@ xfs_dir_removename( } /* - * Read a directory. - */ -int -xfs_readdir( - xfs_inode_t *dp, - struct dir_context *ctx, - size_t bufsize) -{ - int rval; /* return value */ - int v; /* type-checking value */ - - trace_xfs_readdir(dp); - - if (XFS_FORCED_SHUTDOWN(dp->i_mount)) - return XFS_ERROR(EIO); - - ASSERT(S_ISDIR(dp->i_d.di_mode)); - XFS_STATS_INC(xs_dir_getdents); - - if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) - rval = xfs_dir2_sf_getdents(dp, ctx); - else if ((rval = xfs_dir2_isblock(NULL, dp, &v))) - ; - else if (v) - rval = xfs_dir2_block_getdents(dp, ctx); - else - rval = xfs_dir2_leaf_getdents(dp, ctx, bufsize); - return rval; -} - -/* * Replace the inode number of a directory entry. */ int |