diff options
author | Jeff Mahoney <jeffm@suse.com> | 2009-05-10 16:05:39 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-06-11 21:35:58 -0400 |
commit | 73422811d290c628b4ddbf6830e5cd6fa42e84f1 (patch) | |
tree | 9308c36ee82a8217b02848372896209335c69575 /fs/reiserfs/dir.c | |
parent | a525890cb6a2949b644d212ae290b658967d3919 (diff) | |
download | op-kernel-dev-73422811d290c628b4ddbf6830e5cd6fa42e84f1.zip op-kernel-dev-73422811d290c628b4ddbf6830e5cd6fa42e84f1.tar.gz |
reiserfs: allow exposing privroot w/ xattrs enabled
This patch adds an -oexpose_privroot option to allow access to the privroot.
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.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/reiserfs/dir.c b/fs/reiserfs/dir.c index 45ee3d3..6d2668f 100644 --- a/fs/reiserfs/dir.c +++ b/fs/reiserfs/dir.c @@ -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, |