diff options
Diffstat (limited to 'include/linux/quotaops.h')
-rw-r--r-- | include/linux/quotaops.h | 15 |
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 */ | ||
18 | static 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); | |||
63 | int vfs_quota_sync(struct super_block *sb, int type, int wait); | 71 | int vfs_quota_sync(struct super_block *sb, int type, int wait); |
64 | int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); | 72 | int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); |
65 | int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); | 73 | int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); |
66 | int vfs_get_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *di); | 74 | int vfs_get_dqblk(struct super_block *sb, int type, qid_t id, |
67 | int vfs_set_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *di); | 75 | struct fs_disk_quota *di); |
76 | int vfs_set_dqblk(struct super_block *sb, int type, qid_t id, | ||
77 | struct fs_disk_quota *di); | ||
68 | 78 | ||
79 | int __dquot_transfer(struct inode *inode, struct dquot **transfer_to); | ||
69 | int dquot_transfer(struct inode *inode, struct iattr *iattr); | 80 | int dquot_transfer(struct inode *inode, struct iattr *iattr); |
70 | int vfs_dq_quota_on_remount(struct super_block *sb); | 81 | int vfs_dq_quota_on_remount(struct super_block *sb); |
71 | 82 | ||