diff options
author | Jan Kara <jack@suse.cz> | 2017-08-21 08:06:46 -0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2017-08-21 08:06:46 -0400 |
commit | 6c83fd5142c68294acb0e857b7bac2ce8a5077f7 (patch) | |
tree | 66823c319023ae849e59460ba43770e6c39e4122 | |
parent | 7b9ca4c61bc278b771fb57d6290a31ab1fc7fdac (diff) |
quota: Add lock annotations to struct members
Add annotation which lock protects which struct members to struct dquot
and struct mem_dqinfo.
Signed-off-by: Jan Kara <jack@suse.cz>
-rw-r--r-- | include/linux/quota.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/include/linux/quota.h b/include/linux/quota.h index 074123975595..5ac9de4fcd6f 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
@@ -223,12 +223,12 @@ struct mem_dqinfo { | |||
223 | struct quota_format_type *dqi_format; | 223 | struct quota_format_type *dqi_format; |
224 | int dqi_fmt_id; /* Id of the dqi_format - used when turning | 224 | int dqi_fmt_id; /* Id of the dqi_format - used when turning |
225 | * quotas on after remount RW */ | 225 | * quotas on after remount RW */ |
226 | struct list_head dqi_dirty_list; /* List of dirty dquots */ | 226 | struct list_head dqi_dirty_list; /* List of dirty dquots [dq_list_lock] */ |
227 | unsigned long dqi_flags; | 227 | unsigned long dqi_flags; /* DFQ_ flags [dq_data_lock] */ |
228 | unsigned int dqi_bgrace; | 228 | unsigned int dqi_bgrace; /* Space grace time [dq_data_lock] */ |
229 | unsigned int dqi_igrace; | 229 | unsigned int dqi_igrace; /* Inode grace time [dq_data_lock] */ |
230 | qsize_t dqi_max_spc_limit; | 230 | qsize_t dqi_max_spc_limit; /* Maximum space limit [static] */ |
231 | qsize_t dqi_max_ino_limit; | 231 | qsize_t dqi_max_ino_limit; /* Maximum inode limit [static] */ |
232 | void *dqi_priv; | 232 | void *dqi_priv; |
233 | }; | 233 | }; |
234 | 234 | ||
@@ -293,16 +293,16 @@ static inline void dqstats_dec(unsigned int type) | |||
293 | * clear them when it sees fit. */ | 293 | * clear them when it sees fit. */ |
294 | 294 | ||
295 | struct dquot { | 295 | struct dquot { |
296 | struct hlist_node dq_hash; /* Hash list in memory */ | 296 | struct hlist_node dq_hash; /* Hash list in memory [dq_list_lock] */ |
297 | struct list_head dq_inuse; /* List of all quotas */ | 297 | struct list_head dq_inuse; /* List of all quotas [dq_list_lock] */ |
298 | struct list_head dq_free; /* Free list element */ | 298 | struct list_head dq_free; /* Free list element [dq_list_lock] */ |
299 | struct list_head dq_dirty; /* List of dirty dquots */ | 299 | struct list_head dq_dirty; /* List of dirty dquots [dq_list_lock] */ |
300 | struct mutex dq_lock; /* dquot IO lock */ | 300 | struct mutex dq_lock; /* dquot IO lock */ |
301 | spinlock_t dq_dqb_lock; /* Lock protecting dq_dqb changes */ | 301 | spinlock_t dq_dqb_lock; /* Lock protecting dq_dqb changes */ |
302 | atomic_t dq_count; /* Use count */ | 302 | atomic_t dq_count; /* Use count */ |
303 | struct super_block *dq_sb; /* superblock this applies to */ | 303 | struct super_block *dq_sb; /* superblock this applies to */ |
304 | struct kqid dq_id; /* ID this applies to (uid, gid, projid) */ | 304 | struct kqid dq_id; /* ID this applies to (uid, gid, projid) */ |
305 | loff_t dq_off; /* Offset of dquot on disk */ | 305 | loff_t dq_off; /* Offset of dquot on disk [dq_lock, stable once set] */ |
306 | unsigned long dq_flags; /* See DQ_* */ | 306 | unsigned long dq_flags; /* See DQ_* */ |
307 | struct mem_dqblk dq_dqb; /* Diskquota usage [dq_dqb_lock] */ | 307 | struct mem_dqblk dq_dqb; /* Diskquota usage [dq_dqb_lock] */ |
308 | }; | 308 | }; |