Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286648
b: refs/heads/master
c: 46fe44c
h: refs/heads/master
v: v3
  • Loading branch information
Jan Kara committed Jan 12, 2012
1 parent 2ee9eea commit ec61b4f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 34b07840565004cfa444e165e88bf77a5cbcdb25
refs/heads/master: 46fe44ce8777f087aa8ad4a2605fdcfb9c2d63af
8 changes: 5 additions & 3 deletions trunk/fs/quota/dquot.c
Original file line number Diff line number Diff line change
Expand Up @@ -2125,6 +2125,8 @@ static int vfs_load_quota_inode(struct inode *inode, int type, int format_id,
mutex_unlock(&dqopt->dqio_mutex);
goto out_file_init;
}
if (dqopt->flags & DQUOT_QUOTA_SYS_FILE)
dqopt->info[type].dqi_flags |= DQF_SYS_FILE;
mutex_unlock(&dqopt->dqio_mutex);
spin_lock(&dq_state_lock);
dqopt->flags |= dquot_state_flag(flags, type);
Expand Down Expand Up @@ -2464,7 +2466,7 @@ int dquot_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii)
spin_lock(&dq_data_lock);
ii->dqi_bgrace = mi->dqi_bgrace;
ii->dqi_igrace = mi->dqi_igrace;
ii->dqi_flags = mi->dqi_flags & DQF_MASK;
ii->dqi_flags = mi->dqi_flags & DQF_GETINFO_MASK;
ii->dqi_valid = IIF_ALL;
spin_unlock(&dq_data_lock);
mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex);
Expand All @@ -2490,8 +2492,8 @@ int dquot_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii)
if (ii->dqi_valid & IIF_IGRACE)
mi->dqi_igrace = ii->dqi_igrace;
if (ii->dqi_valid & IIF_FLAGS)
mi->dqi_flags = (mi->dqi_flags & ~DQF_MASK) |
(ii->dqi_flags & DQF_MASK);
mi->dqi_flags = (mi->dqi_flags & ~DQF_SETINFO_MASK) |
(ii->dqi_flags & DQF_SETINFO_MASK);
spin_unlock(&dq_data_lock);
mark_info_dirty(sb, type);
/* Force write to disk */
Expand Down
6 changes: 5 additions & 1 deletion trunk/include/linux/quota.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,11 @@ struct mem_dqinfo {
struct super_block;

#define DQF_MASK 0xffff /* Mask for format specific flags */
#define DQF_INFO_DIRTY_B 16
#define DQF_GETINFO_MASK 0x1ffff /* Mask for flags passed to userspace */
#define DQF_SETINFO_MASK 0xffff /* Mask for flags modifiable from userspace */
#define DQF_SYS_FILE_B 16
#define DQF_SYS_FILE (1 << DQF_SYS_FILE_B) /* Quota file stored as system file */
#define DQF_INFO_DIRTY_B 31
#define DQF_INFO_DIRTY (1 << DQF_INFO_DIRTY_B) /* Is info dirty? */

extern void mark_info_dirty(struct super_block *sb, int type);
Expand Down

0 comments on commit ec61b4f

Please sign in to comment.