summaryrefslogtreecommitdiff
path: root/fs/quota
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2012-04-25 21:10:31 +0200
committerJan Kara <jack@suse.cz>2012-05-15 23:34:39 +0200
commitf9ef178412cab442719c9ffdc659933f5f2fa87e (patch)
treefd80b46cb8ac04c97a0df67063fa27a86042298d /fs/quota
parente2a3fde75079efeb22cf1e5098d5689b664bf1d5 (diff)
downloadlwn-f9ef178412cab442719c9ffdc659933f5f2fa87e.tar.gz
lwn-f9ef178412cab442719c9ffdc659933f5f2fa87e.zip
quota: Use precomputed value of sb_dqopt in dquot_quota_sync
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/quota')
-rw-r--r--fs/quota/dquot.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index 0dcdda305c99..6e429fdda17d 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -638,7 +638,7 @@ int dquot_quota_sync(struct super_block *sb, int type, int wait)
dqstats_inc(DQST_SYNCS);
mutex_unlock(&dqopt->dqonoff_mutex);
- if (!wait || (sb_dqopt(sb)->flags & DQUOT_QUOTA_SYS_FILE))
+ if (!wait || (dqopt->flags & DQUOT_QUOTA_SYS_FILE))
return 0;
/* This is not very clever (and fast) but currently I don't know about
@@ -652,18 +652,18 @@ int dquot_quota_sync(struct super_block *sb, int type, int wait)
* Now when everything is written we can discard the pagecache so
* that userspace sees the changes.
*/
- mutex_lock(&sb_dqopt(sb)->dqonoff_mutex);
+ mutex_lock(&dqopt->dqonoff_mutex);
for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
if (type != -1 && cnt != type)
continue;
if (!sb_has_quota_active(sb, cnt))
continue;
- mutex_lock_nested(&sb_dqopt(sb)->files[cnt]->i_mutex,
+ mutex_lock_nested(&dqopt->files[cnt]->i_mutex,
I_MUTEX_QUOTA);
- truncate_inode_pages(&sb_dqopt(sb)->files[cnt]->i_data, 0);
- mutex_unlock(&sb_dqopt(sb)->files[cnt]->i_mutex);
+ truncate_inode_pages(&dqopt->files[cnt]->i_data, 0);
+ mutex_unlock(&dqopt->files[cnt]->i_mutex);
}
- mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex);
+ mutex_unlock(&dqopt->dqonoff_mutex);
return 0;
}