aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/export.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-05-16 14:14:48 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-06-29 12:56:35 +0400
commitd81a8ef59802d2d8908466d631573a3644c313d5 (patch)
tree108b4b58e1c518aaa073e375abcf2bbafb34cbf2 /fs/gfs2/export.c
parent[readdir] convert exofs (diff)
downloadlinux-dev-d81a8ef59802d2d8908466d631573a3644c313d5.tar.xz
linux-dev-d81a8ef59802d2d8908466d631573a3644c313d5.zip
[readdir] convert gfs2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/gfs2/export.c')
-rw-r--r--fs/gfs2/export.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/gfs2/export.c b/fs/gfs2/export.c
index 9973df4ff565..aed4003486d6 100644
--- a/fs/gfs2/export.c
+++ b/fs/gfs2/export.c
@@ -64,6 +64,7 @@ static int gfs2_encode_fh(struct inode *inode, __u32 *p, int *len,
}
struct get_name_filldir {
+ struct dir_context ctx;
struct gfs2_inum_host inum;
char *name;
};
@@ -90,7 +91,6 @@ static int gfs2_get_name(struct dentry *parent, char *name,
struct gfs2_inode *dip, *ip;
struct get_name_filldir gnfd;
struct gfs2_holder gh;
- u64 offset = 0;
int error;
struct file_ra_state f_ra = { .start = 0 };
@@ -107,12 +107,14 @@ static int gfs2_get_name(struct dentry *parent, char *name,
gnfd.inum.no_addr = ip->i_no_addr;
gnfd.inum.no_formal_ino = ip->i_no_formal_ino;
gnfd.name = name;
+ gnfd.ctx.actor = get_name_filldir;
+ gnfd.ctx.pos = 0;
error = gfs2_glock_nq_init(dip->i_gl, LM_ST_SHARED, 0, &gh);
if (error)
return error;
- error = gfs2_dir_read(dir, &offset, &gnfd, get_name_filldir, &f_ra);
+ error = gfs2_dir_read(dir, &gnfd.ctx, &f_ra);
gfs2_glock_dq_uninit(&gh);