summaryrefslogtreecommitdiff
path: root/fs/reiserfs/dir.c
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2009-05-05 23:30:17 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-05-09 18:49:39 +0400
commit677c9b2e393a0cd203bd54e9c18b012b2c73305a (patch)
tree575d3f70bb9fbf12171ff526909b68377bede67b /fs/reiserfs/dir.c
parentb82bb72ba7df473461c5e2368a4e7497c8ce76e9 (diff)
downloadlinux-677c9b2e393a0cd203bd54e9c18b012b2c73305a.tar.xz
reiserfs: remove privroot hiding in lookup
With Al Viro's patch to move privroot lookup to fs mount, there's no need to have special code to hide the privroot in reiserfs_lookup. I've also cleaned up the privroot hiding in reiserfs_readdir_dentry and removed the last user of reiserfs_xattrs(). Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/reiserfs/dir.c')
-rw-r--r--fs/reiserfs/dir.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/fs/reiserfs/dir.c b/fs/reiserfs/dir.c
index 67a80d7e59e2..45ee3d357c70 100644
--- a/fs/reiserfs/dir.c
+++ b/fs/reiserfs/dir.c
@@ -41,6 +41,18 @@ static int reiserfs_dir_fsync(struct file *filp, struct dentry *dentry,
#define store_ih(where,what) copy_item_head (where, what)
+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;
+}
+
int reiserfs_readdir_dentry(struct dentry *dentry, void *dirent,
filldir_t filldir, loff_t *pos)
{
@@ -138,18 +150,8 @@ int reiserfs_readdir_dentry(struct dentry *dentry, void *dirent,
}
/* Ignore the .reiserfs_priv entry */
- if (reiserfs_xattrs(inode->i_sb) &&
- !old_format_only(inode->i_sb) &&
- dentry == inode->i_sb->s_root &&
- REISERFS_SB(inode->i_sb)->priv_root &&
- REISERFS_SB(inode->i_sb)->priv_root->d_inode
- && deh_objectid(deh) ==
- le32_to_cpu(INODE_PKEY
- (REISERFS_SB(inode->i_sb)->
- priv_root->d_inode)->
- k_objectid)) {
+ if (is_privroot_deh(dentry, deh))
continue;
- }
d_off = deh_offset(deh);
*pos = d_off;