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 f8dbeb0fe0c9..e38ae53f3529 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
@@ -18,6 +18,14 @@ static inline struct quota_info *sb_dqopt(struct super_block *sb) | |||
18 | return &sb->s_dquot; | 18 | return &sb->s_dquot; |
19 | } | 19 | } |
20 | 20 | ||
21 | /* i_mutex must being held */ | ||
22 | static inline bool is_quota_modification(struct inode *inode, struct iattr *ia) | ||
23 | { | ||
24 | return (ia->ia_valid & ATTR_SIZE && ia->ia_size != inode->i_size) || | ||
25 | (ia->ia_valid & ATTR_UID && ia->ia_uid != inode->i_uid) || | ||
26 | (ia->ia_valid & ATTR_GID && ia->ia_gid != inode->i_gid); | ||
27 | } | ||
28 | |||
21 | #if defined(CONFIG_QUOTA) | 29 | #if defined(CONFIG_QUOTA) |
22 | 30 | ||
23 | /* | 31 | /* |
@@ -66,9 +74,12 @@ int vfs_quota_disable(struct super_block *sb, int type, unsigned int flags); | |||
66 | int vfs_quota_sync(struct super_block *sb, int type, int wait); | 74 | int vfs_quota_sync(struct super_block *sb, int type, int wait); |
67 | int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); | 75 | int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); |
68 | int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); | 76 | int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); |
69 | int vfs_get_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *di); | 77 | int vfs_get_dqblk(struct super_block *sb, int type, qid_t id, |
70 | int vfs_set_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *di); | 78 | struct fs_disk_quota *di); |
79 | int vfs_set_dqblk(struct super_block *sb, int type, qid_t id, | ||
80 | struct fs_disk_quota *di); | ||
71 | 81 | ||
82 | int __dquot_transfer(struct inode *inode, struct dquot **transfer_to); | ||
72 | int dquot_transfer(struct inode *inode, struct iattr *iattr); | 83 | int dquot_transfer(struct inode *inode, struct iattr *iattr); |
73 | int vfs_dq_quota_on_remount(struct super_block *sb); | 84 | int vfs_dq_quota_on_remount(struct super_block *sb); |
74 | 85 | ||