diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2009-05-03 06:00:05 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-05-09 10:49:38 -0400 |
commit | edcc37a0478836b4a51eafb1bcec6a52708f681d (patch) | |
tree | 95294fa607420d760823401a6c6e7d9deb698bb1 /fs/reiserfs/super.c | |
parent | 5a6059c358d3b3004cb6b8562e3b049b1f8564f9 (diff) |
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.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index 0ae6486d904..d444fe0013a 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) | |||
1842 | goto error; | 1842 | goto error; |
1843 | } | 1843 | } |
1844 | 1844 | ||
1845 | if ((errval = reiserfs_xattr_init(s, s->s_flags))) { | 1845 | if ((errval = reiserfs_lookup_privroot(s)) || |
1846 | (errval = reiserfs_xattr_init(s, s->s_flags))) { | ||
1846 | dput(s->s_root); | 1847 | dput(s->s_root); |
1847 | s->s_root = NULL; | 1848 | s->s_root = NULL; |
1848 | goto error; | 1849 | goto error; |
@@ -1855,7 +1856,8 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent) | |||
1855 | reiserfs_info(s, "using 3.5.x disk format\n"); | 1856 | reiserfs_info(s, "using 3.5.x disk format\n"); |
1856 | } | 1857 | } |
1857 | 1858 | ||
1858 | if ((errval = reiserfs_xattr_init(s, s->s_flags))) { | 1859 | if ((errval = reiserfs_lookup_privroot(s)) || |
1860 | (errval = reiserfs_xattr_init(s, s->s_flags))) { | ||
1859 | dput(s->s_root); | 1861 | dput(s->s_root); |
1860 | s->s_root = NULL; | 1862 | s->s_root = NULL; |
1861 | goto error; | 1863 | goto error; |