mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
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>
This commit is contained in:
parent
edcc37a047
commit
ab17c4f021
3 changed files with 48 additions and 29 deletions
|
|
@ -402,7 +402,7 @@ struct reiserfs_sb_info {
|
|||
int reserved_blocks; /* amount of blocks reserved for further allocations */
|
||||
spinlock_t bitmap_lock; /* this lock on now only used to protect reserved_blocks variable */
|
||||
struct dentry *priv_root; /* root of /.reiserfs_priv */
|
||||
struct dentry *xattr_root; /* root of /.reiserfs_priv/.xa */
|
||||
struct dentry *xattr_root; /* root of /.reiserfs_priv/xattrs */
|
||||
int j_errno;
|
||||
#ifdef CONFIG_QUOTA
|
||||
char *s_qf_names[MAXQUOTAS];
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ static inline size_t reiserfs_xattr_jcreate_nblocks(struct inode *inode)
|
|||
|
||||
if ((REISERFS_I(inode)->i_flags & i_has_xattr_dir) == 0) {
|
||||
nblocks += JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb);
|
||||
if (REISERFS_SB(inode->i_sb)->xattr_root == NULL)
|
||||
if (!REISERFS_SB(inode->i_sb)->xattr_root->d_inode)
|
||||
nblocks += JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue