aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/export.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/export.c')
-rw-r--r--fs/gfs2/export.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/gfs2/export.c b/fs/gfs2/export.c
index 9973df4ff565..8b9b3775e2e7 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,
64} 64}
65 65
66struct get_name_filldir { 66struct get_name_filldir {
67 struct dir_context ctx;
67 struct gfs2_inum_host inum; 68 struct gfs2_inum_host inum;
68 char *name; 69 char *name;
69}; 70};
@@ -88,9 +89,11 @@ static int gfs2_get_name(struct dentry *parent, char *name,
88 struct inode *dir = parent->d_inode; 89 struct inode *dir = parent->d_inode;
89 struct inode *inode = child->d_inode; 90 struct inode *inode = child->d_inode;
90 struct gfs2_inode *dip, *ip; 91 struct gfs2_inode *dip, *ip;
91 struct get_name_filldir gnfd; 92 struct get_name_filldir gnfd = {
93 .ctx.actor = get_name_filldir,
94 .name = name
95 };
92 struct gfs2_holder gh; 96 struct gfs2_holder gh;
93 u64 offset = 0;
94 int error; 97 int error;
95 struct file_ra_state f_ra = { .start = 0 }; 98 struct file_ra_state f_ra = { .start = 0 };
96 99
@@ -106,13 +109,12 @@ static int gfs2_get_name(struct dentry *parent, char *name,
106 *name = 0; 109 *name = 0;
107 gnfd.inum.no_addr = ip->i_no_addr; 110 gnfd.inum.no_addr = ip->i_no_addr;
108 gnfd.inum.no_formal_ino = ip->i_no_formal_ino; 111 gnfd.inum.no_formal_ino = ip->i_no_formal_ino;
109 gnfd.name = name;
110 112
111 error = gfs2_glock_nq_init(dip->i_gl, LM_ST_SHARED, 0, &gh); 113 error = gfs2_glock_nq_init(dip->i_gl, LM_ST_SHARED, 0, &gh);
112 if (error) 114 if (error)
113 return error; 115 return error;
114 116
115 error = gfs2_dir_read(dir, &offset, &gnfd, get_name_filldir, &f_ra); 117 error = gfs2_dir_read(dir, &gnfd.ctx, &f_ra);
116 118
117 gfs2_glock_dq_uninit(&gh); 119 gfs2_glock_dq_uninit(&gh);
118 120