diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2010-09-17 11:30:23 (GMT) |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2010-09-20 10:21:09 (GMT) |
commit | 8d1235852b462cfb66aa036bd4a2686763c69ed4 (patch) | |
tree | 9ac348ed6183c4dc509dba3d2ef750043266c82c /fs/gfs2/export.c | |
parent | 9fa0ea9f26f64fbfc3dfd51d1dc2c230b65ffb19 (diff) | |
download | linux-8d1235852b462cfb66aa036bd4a2686763c69ed4.tar.xz |
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.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/gfs2/export.c b/fs/gfs2/export.c index dfe237a..06d5827 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, static struct dentry *gfs2_get_parent(struct dentry *child) { - struct qstr dotdot; struct dentry *dentry; - /* - * XXX(hch): it would be a good idea to keep this around as a - * static variable. - */ - gfs2_str2qstr(&dotdot, ".."); - - dentry = d_obtain_alias(gfs2_lookupi(child->d_inode, &dotdot, 1)); + dentry = d_obtain_alias(gfs2_lookupi(child->d_inode, &gfs2_qdotdot, 1)); if (!IS_ERR(dentry)) dentry->d_op = &gfs2_dops; return dentry; |