Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx
[firefly-linux-kernel-4.4.55.git] / fs / reiserfs / dir.c
index 45ee3d357c70e34de25b0535e89ee4cf2f309538..6d2668fdc3848eb5b2be29d027c5634c727148f6 100644 (file)
@@ -44,13 +44,11 @@ static int reiserfs_dir_fsync(struct file *filp, struct dentry *dentry,
 static inline bool is_privroot_deh(struct dentry *dir,
                                   struct reiserfs_de_head *deh)
 {
-       int ret = 0;
-#ifdef CONFIG_REISERFS_FS_XATTR
        struct dentry *privroot = REISERFS_SB(dir->d_sb)->priv_root;
-       ret = (dir == dir->d_parent && privroot->d_inode &&
-              deh->deh_objectid == INODE_PKEY(privroot->d_inode)->k_objectid);
-#endif
-       return ret;
+       if (reiserfs_expose_privroot(dir->d_sb))
+               return 0;
+       return (dir == dir->d_parent && privroot->d_inode &&
+               deh->deh_objectid == INODE_PKEY(privroot->d_inode)->k_objectid);
 }
 
 int reiserfs_readdir_dentry(struct dentry *dentry, void *dirent,