summaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/super.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-05-03 06:00:05 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-05-09 10:49:38 -0400
commitedcc37a0478836b4a51eafb1bcec6a52708f681d (patch)
tree95294fa607420d760823401a6c6e7d9deb698bb1 /fs/reiserfs/super.c
parent5a6059c358d3b3004cb6b8562e3b049b1f8564f9 (diff)
downloadlinux-edcc37a0478836b4a51eafb1bcec6a52708f681d.tar.gz
linux-edcc37a0478836b4a51eafb1bcec6a52708f681d.tar.bz2
linux-edcc37a0478836b4a51eafb1bcec6a52708f681d.zip
Always lookup priv_root on reiserfs mount and keep it
... even if it's a negative dentry. That way we can set ->d_op on root before anyone could race with us. Simplify d_compare(), while we are at it. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/reiserfs/super.c')
-rw-r--r--fs/reiserfs/super.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index 0ae6486d9046..d444fe0013a4 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -1842,7 +1842,8 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
goto error;
}
- if ((errval = reiserfs_xattr_init(s, s->s_flags))) {
+ if ((errval = reiserfs_lookup_privroot(s)) ||
+ (errval = reiserfs_xattr_init(s, s->s_flags))) {
dput(s->s_root);
s->s_root = NULL;
goto error;
@@ -1855,7 +1856,8 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
reiserfs_info(s, "using 3.5.x disk format\n");
}
- if ((errval = reiserfs_xattr_init(s, s->s_flags))) {
+ if ((errval = reiserfs_lookup_privroot(s)) ||
+ (errval = reiserfs_xattr_init(s, s->s_flags))) {
dput(s->s_root);
s->s_root = NULL;
goto error;