Skip to content

Commit f9ef178

Browse files
committed
quota: Use precomputed value of sb_dqopt in dquot_quota_sync
Signed-off-by: Jan Kara <jack@suse.cz>
1 parent e2a3fde commit f9ef178

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎fs/quota/dquot.c‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ int dquot_quota_sync(struct super_block *sb, int type, int wait)
638638
dqstats_inc(DQST_SYNCS);
639639
mutex_unlock(&dqopt->dqonoff_mutex);
640640

641-
if (!wait || (sb_dqopt(sb)->flags & DQUOT_QUOTA_SYS_FILE))
641+
if (!wait || (dqopt->flags & DQUOT_QUOTA_SYS_FILE))
642642
return 0;
643643

644644
/* 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)
652652
* Now when everything is written we can discard the pagecache so
653653
* that userspace sees the changes.
654654
*/
655-
mutex_lock(&sb_dqopt(sb)->dqonoff_mutex);
655+
mutex_lock(&dqopt->dqonoff_mutex);
656656
for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
657657
if (type != -1 && cnt != type)
658658
continue;
659659
if (!sb_has_quota_active(sb, cnt))
660660
continue;
661-
mutex_lock_nested(&sb_dqopt(sb)->files[cnt]->i_mutex,
661+
mutex_lock_nested(&dqopt->files[cnt]->i_mutex,
662662
I_MUTEX_QUOTA);
663-
truncate_inode_pages(&sb_dqopt(sb)->files[cnt]->i_data, 0);
664-
mutex_unlock(&sb_dqopt(sb)->files[cnt]->i_mutex);
663+
truncate_inode_pages(&dqopt->files[cnt]->i_data, 0);
664+
mutex_unlock(&dqopt->files[cnt]->i_mutex);
665665
}
666-
mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex);
666+
mutex_unlock(&dqopt->dqonoff_mutex);
667667

668668
return 0;
669669
}

0 commit comments

Comments
 (0)