reiserfs: deal with NULL xattr root w/ xattrs disabled
[deliverable/linux.git] / fs / reiserfs / xattr.c
index cf949646dd574136f0d61dc7eff1387b7e2d0a96..628075ca82c1672170e719ec31b46bf72399bf60 100644 (file)
@@ -123,7 +123,9 @@ static struct dentry *open_xa_root(struct super_block *sb, int flags)
        mutex_lock_nested(&privroot->d_inode->i_mutex, I_MUTEX_XATTR);
 
        xaroot = dget(REISERFS_SB(sb)->xattr_root);
-       if (!xaroot->d_inode) {
+       if (!xaroot)
+               xaroot = ERR_PTR(-ENODATA);
+       else if (!xaroot->d_inode) {
                int err = -ENODATA;
                if (xattr_may_create(flags))
                        err = xattr_mkdir(privroot->d_inode, xaroot, 0700);
This page took 0.025627 seconds and 5 git commands to generate.