aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/export.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2010-09-17 07:30:23 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2010-09-20 06:21:09 -0400
commit8d1235852b462cfb66aa036bd4a2686763c69ed4 (patch)
tree9ac348ed6183c4dc509dba3d2ef750043266c82c /fs/gfs2/export.c
parent9fa0ea9f26f64fbfc3dfd51d1dc2c230b65ffb19 (diff)
GFS2: Make . and .. qstrs constant
Rather than calculating the qstrs for . and .. each time we need them, its better to keep a constant version of these and just refer to them when required. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> Reviewed-by: Christoph Hellwig <hch@infradead.org>
Diffstat (limited to 'fs/gfs2/export.c')
-rw-r--r--fs/gfs2/export.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/gfs2/export.c b/fs/gfs2/export.c
index dfe237a3f8ad..06d582732d34 100644
--- a/fs/gfs2/export.c
+++ b/fs/gfs2/export.c
@@ -126,16 +126,9 @@ static int gfs2_get_name(struct dentry *parent, char *name,
126 126
127static struct dentry *gfs2_get_parent(struct dentry *child) 127static struct dentry *gfs2_get_parent(struct dentry *child)
128{ 128{
129 struct qstr dotdot;
130 struct dentry *dentry; 129 struct dentry *dentry;
131 130
132 /* 131 dentry = d_obtain_alias(gfs2_lookupi(child->d_inode, &gfs2_qdotdot, 1));
133 * XXX(hch): it would be a good idea to keep this around as a
134 * static variable.
135 */
136 gfs2_str2qstr(&dotdot, "..");
137
138 dentry = d_obtain_alias(gfs2_lookupi(child->d_inode, &dotdot, 1));
139 if (!IS_ERR(dentry)) 132 if (!IS_ERR(dentry))
140 dentry->d_op = &gfs2_dops; 133 dentry->d_op = &gfs2_dops;
141 return dentry; 134 return dentry;