aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/quotaops.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/quotaops.h')
-rw-r--r--include/linux/quotaops.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h
index e6fa7acce290..370abb1e99cb 100644
--- a/include/linux/quotaops.h
+++ b/include/linux/quotaops.h
@@ -14,6 +14,14 @@ static inline struct quota_info *sb_dqopt(struct super_block *sb)
14 return &sb->s_dquot; 14 return &sb->s_dquot;
15} 15}
16 16
17/* i_mutex must being held */
18static inline bool is_quota_modification(struct inode *inode, struct iattr *ia)
19{
20 return (ia->ia_valid & ATTR_SIZE && ia->ia_size != inode->i_size) ||
21 (ia->ia_valid & ATTR_UID && ia->ia_uid != inode->i_uid) ||
22 (ia->ia_valid & ATTR_GID && ia->ia_gid != inode->i_gid);
23}
24
17#if defined(CONFIG_QUOTA) 25#if defined(CONFIG_QUOTA)
18 26
19/* 27/*
@@ -63,9 +71,12 @@ int vfs_quota_disable(struct super_block *sb, int type, unsigned int flags);
63int vfs_quota_sync(struct super_block *sb, int type, int wait); 71int vfs_quota_sync(struct super_block *sb, int type, int wait);
64int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); 72int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii);
65int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); 73int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii);
66int vfs_get_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *di); 74int vfs_get_dqblk(struct super_block *sb, int type, qid_t id,
67int vfs_set_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *di); 75 struct fs_disk_quota *di);
76int vfs_set_dqblk(struct super_block *sb, int type, qid_t id,
77 struct fs_disk_quota *di);
68 78
79int __dquot_transfer(struct inode *inode, struct dquot **transfer_to);
69int dquot_transfer(struct inode *inode, struct iattr *iattr); 80int dquot_transfer(struct inode *inode, struct iattr *iattr);
70int vfs_dq_quota_on_remount(struct super_block *sb); 81int vfs_dq_quota_on_remount(struct super_block *sb);
71 82