Skip to content

Commit

Permalink
jfs: Convert to private i_dquot field
Browse files Browse the repository at this point in the history
Acked-by: Dave Kleikamp <dave.kleikamp@oracle.com>
CC: jfs-discussion@lists.sourceforge.net
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
  • Loading branch information
Jan Kara committed Nov 10, 2014
1 parent 5387363 commit 507e1fa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/jfs/jfs_incore.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ struct jfs_inode_info {
unchar _inline_ea[128]; /* 128: inline extended attr */
} link;
} u;
#ifdef CONFIG_QUOTA
struct dquot *i_dquot[MAXQUOTAS];
#endif
u32 dev; /* will die when we get wide dev_t */
struct inode vfs_inode;
};
Expand Down
9 changes: 9 additions & 0 deletions fs/jfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ static struct inode *jfs_alloc_inode(struct super_block *sb)
jfs_inode = kmem_cache_alloc(jfs_inode_cachep, GFP_NOFS);
if (!jfs_inode)
return NULL;
#ifdef CONFIG_QUOTA
memset(&jfs_inode->i_dquot, 0, sizeof(jfs_inode->i_dquot));
#endif
return &jfs_inode->vfs_inode;
}

Expand Down Expand Up @@ -537,6 +540,7 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent)
#ifdef CONFIG_QUOTA
sb->dq_op = &dquot_operations;
sb->s_qcop = &dquot_quotactl_ops;
sb->s_quota_types = QTYPE_MASK_USR | QTYPE_MASK_GRP;
#endif

/*
Expand Down Expand Up @@ -836,6 +840,10 @@ static ssize_t jfs_quota_write(struct super_block *sb, int type,
return len - towrite;
}

static struct dquot **jfs_get_dquots(struct inode *inode)
{
return JFS_IP(inode)->i_dquot;
}
#endif

static const struct super_operations jfs_super_operations = {
Expand All @@ -854,6 +862,7 @@ static const struct super_operations jfs_super_operations = {
#ifdef CONFIG_QUOTA
.quota_read = jfs_quota_read,
.quota_write = jfs_quota_write,
.get_dquots = jfs_get_dquots,
#endif
};

Expand Down

0 comments on commit 507e1fa

Please sign in to comment.