aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2009-05-05 15:30:15 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-05-09 10:49:39 -0400
commitab17c4f02156c4f75d7fa43a5aa2a7f942d47201 (patch)
tree20ff8ec91144d20966ac70adb24bd3372e3508c4 /include/linux
parentedcc37a0478836b4a51eafb1bcec6a52708f681d (diff)
reiserfs: fixup xattr_root caching
The xattr_root caching was broken from my previous patch set. It wouldn't cause corruption, but could cause decreased performance due to allocating a larger chunk of the journal (~ 27 blocks) than it would actually use. This patch loads the xattr root dentry at xattr initialization and creates it on-demand. Since we're using the cached dentry, there's no point in keeping lookup_or_create_dir around, so that's removed. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/reiserfs_fs_sb.h2
-rw-r--r--include/linux/reiserfs_xattr.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h
index 6b361d23a499..8651640868a1 100644
--- a/include/linux/reiserfs_fs_sb.h
+++ b/include/linux/reiserfs_fs_sb.h
@@ -402,7 +402,7 @@ struct reiserfs_sb_info {
402 int reserved_blocks; /* amount of blocks reserved for further allocations */ 402 int reserved_blocks; /* amount of blocks reserved for further allocations */
403 spinlock_t bitmap_lock; /* this lock on now only used to protect reserved_blocks variable */ 403 spinlock_t bitmap_lock; /* this lock on now only used to protect reserved_blocks variable */
404 struct dentry *priv_root; /* root of /.reiserfs_priv */ 404 struct dentry *priv_root; /* root of /.reiserfs_priv */
405 struct dentry *xattr_root; /* root of /.reiserfs_priv/.xa */ 405 struct dentry *xattr_root; /* root of /.reiserfs_priv/xattrs */
406 int j_errno; 406 int j_errno;
407#ifdef CONFIG_QUOTA 407#ifdef CONFIG_QUOTA
408 char *s_qf_names[MAXQUOTAS]; 408 char *s_qf_names[MAXQUOTAS];
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h
index fea1a8e65bef..cdedc01036e4 100644
--- a/include/linux/reiserfs_xattr.h
+++ b/include/linux/reiserfs_xattr.h
@@ -98,7 +98,7 @@ static inline size_t reiserfs_xattr_jcreate_nblocks(struct inode *inode)
98 98
99 if ((REISERFS_I(inode)->i_flags & i_has_xattr_dir) == 0) { 99 if ((REISERFS_I(inode)->i_flags & i_has_xattr_dir) == 0) {
100 nblocks += JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb); 100 nblocks += JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb);
101 if (REISERFS_SB(inode->i_sb)->xattr_root == NULL) 101 if (!REISERFS_SB(inode->i_sb)->xattr_root->d_inode)
102 nblocks += JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb); 102 nblocks += JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb);
103 } 103 }
104 104