diff options
author | Jan Kara <jack@suse.cz> | 2011-11-16 09:03:59 -0500 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2012-01-12 07:09:09 -0500 |
commit | 46fe44ce8777f087aa8ad4a2605fdcfb9c2d63af (patch) | |
tree | fd33eed190c800f77e41a817f697cd0957d28647 /fs | |
parent | 34b07840565004cfa444e165e88bf77a5cbcdb25 (diff) |
quota: Pass information that quota is stored in system file to userspace
Quota tools need to know whether quota is stored in a system file or in
classical aquota.{user|group} files. So pass this information as a flag
in GETINFO quotactl.
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/quota/dquot.c | 8 |
1 files changed, 5 insertions, 3 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 */ |