diff options
Diffstat (limited to 'include/linux/quotaops.h')
-rw-r--r-- | include/linux/quotaops.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index 82c70c42d035..8a7818764a67 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 | /* |