diff options
-rw-r--r-- | fs/quota/dquot.c | 8 | ||||
-rw-r--r-- | include/linux/quota.h | 6 |
2 files changed, 10 insertions, 4 deletions
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index 5ec59b20cf76..46741970371b 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c | |||
@@ -2125,6 +2125,8 @@ static int vfs_load_quota_inode(struct inode *inode, int type, int format_id, | |||
2125 | mutex_unlock(&dqopt->dqio_mutex); | 2125 | mutex_unlock(&dqopt->dqio_mutex); |
2126 | goto out_file_init; | 2126 | goto out_file_init; |
2127 | } | 2127 | } |
2128 | if (dqopt->flags & DQUOT_QUOTA_SYS_FILE) | ||
2129 | dqopt->info[type].dqi_flags |= DQF_SYS_FILE; | ||
2128 | mutex_unlock(&dqopt->dqio_mutex); | 2130 | mutex_unlock(&dqopt->dqio_mutex); |
2129 | spin_lock(&dq_state_lock); | 2131 | spin_lock(&dq_state_lock); |
2130 | dqopt->flags |= dquot_state_flag(flags, type); | 2132 | dqopt->flags |= dquot_state_flag(flags, type); |
@@ -2464,7 +2466,7 @@ int dquot_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii) | |||
2464 | spin_lock(&dq_data_lock); | 2466 | spin_lock(&dq_data_lock); |
2465 | ii->dqi_bgrace = mi->dqi_bgrace; | 2467 | ii->dqi_bgrace = mi->dqi_bgrace; |
2466 | ii->dqi_igrace = mi->dqi_igrace; | 2468 | ii->dqi_igrace = mi->dqi_igrace; |
2467 | ii->dqi_flags = mi->dqi_flags & DQF_MASK; | 2469 | ii->dqi_flags = mi->dqi_flags & DQF_GETINFO_MASK; |
2468 | ii->dqi_valid = IIF_ALL; | 2470 | ii->dqi_valid = IIF_ALL; |
2469 | spin_unlock(&dq_data_lock); | 2471 | spin_unlock(&dq_data_lock); |
2470 | mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex); | 2472 | mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex); |
@@ -2490,8 +2492,8 @@ int dquot_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii) | |||
2490 | if (ii->dqi_valid & IIF_IGRACE) | 2492 | if (ii->dqi_valid & IIF_IGRACE) |
2491 | mi->dqi_igrace = ii->dqi_igrace; | 2493 | mi->dqi_igrace = ii->dqi_igrace; |
2492 | if (ii->dqi_valid & IIF_FLAGS) | 2494 | if (ii->dqi_valid & IIF_FLAGS) |
2493 | mi->dqi_flags = (mi->dqi_flags & ~DQF_MASK) | | 2495 | mi->dqi_flags = (mi->dqi_flags & ~DQF_SETINFO_MASK) | |
2494 | (ii->dqi_flags & DQF_MASK); | 2496 | (ii->dqi_flags & DQF_SETINFO_MASK); |
2495 | spin_unlock(&dq_data_lock); | 2497 | spin_unlock(&dq_data_lock); |
2496 | mark_info_dirty(sb, type); | 2498 | mark_info_dirty(sb, type); |
2497 | /* Force write to disk */ | 2499 | /* Force write to disk */ |
diff --git a/include/linux/quota.h b/include/linux/quota.h index cb7855699037..c09fa042b5ea 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
@@ -230,7 +230,11 @@ struct mem_dqinfo { | |||
230 | struct super_block; | 230 | struct super_block; |
231 | 231 | ||
232 | #define DQF_MASK 0xffff /* Mask for format specific flags */ | 232 | #define DQF_MASK 0xffff /* Mask for format specific flags */ |
233 | #define DQF_INFO_DIRTY_B 16 | 233 | #define DQF_GETINFO_MASK 0x1ffff /* Mask for flags passed to userspace */ |
234 | #define DQF_SETINFO_MASK 0xffff /* Mask for flags modifiable from userspace */ | ||
235 | #define DQF_SYS_FILE_B 16 | ||
236 | #define DQF_SYS_FILE (1 << DQF_SYS_FILE_B) /* Quota file stored as system file */ | ||
237 | #define DQF_INFO_DIRTY_B 31 | ||
234 | #define DQF_INFO_DIRTY (1 << DQF_INFO_DIRTY_B) /* Is info dirty? */ | 238 | #define DQF_INFO_DIRTY (1 << DQF_INFO_DIRTY_B) /* Is info dirty? */ |
235 | 239 | ||
236 | extern void mark_info_dirty(struct super_block *sb, int type); | 240 | extern void mark_info_dirty(struct super_block *sb, int type); |