Skip to content

Commit 5a1906a

Browse files
author
Andreas Gruenbacher
committed
gfs2: Revert "check for no eligible quota changes"
Since the previous commit, function gfs2_quota_sync() will not cause the sync generation to creep forward by one every time the function is called; this helps keep things a but more tidy. We also don't care that this function allocates a page of memory every time it is called, so no good reason for keeping qd_changed() anymore, which just duplicates qd_grab_sync(). This reverts commit 06aa6fd. Signed-off-by: Andreas Gruenbacher <[email protected]>
1 parent d9a75a6 commit 5a1906a

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

fs/gfs2/quota.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,24 +1308,6 @@ void gfs2_quota_change(struct gfs2_inode *ip, s64 change,
13081308
}
13091309
}
13101310

1311-
static bool qd_changed(struct gfs2_sbd *sdp)
1312-
{
1313-
struct gfs2_quota_data *qd;
1314-
bool changed = false;
1315-
1316-
spin_lock(&qd_lock);
1317-
list_for_each_entry(qd, &sdp->sd_quota_list, qd_list) {
1318-
spin_lock(&qd->qd_lockref.lock);
1319-
changed = !test_bit(QDF_LOCKED, &qd->qd_flags) &&
1320-
test_bit(QDF_CHANGE, &qd->qd_flags);
1321-
spin_unlock(&qd->qd_lockref.lock);
1322-
if (changed)
1323-
break;
1324-
}
1325-
spin_unlock(&qd_lock);
1326-
return changed;
1327-
}
1328-
13291311
int gfs2_quota_sync(struct super_block *sb, int type)
13301312
{
13311313
struct gfs2_sbd *sdp = sb->s_fs_info;
@@ -1336,8 +1318,6 @@ int gfs2_quota_sync(struct super_block *sb, int type)
13361318

13371319
if (sb_rdonly(sdp->sd_vfs))
13381320
return 0;
1339-
if (!qd_changed(sdp))
1340-
return 0;
13411321

13421322
qda = kcalloc(max_qd, sizeof(struct gfs2_quota_data *), GFP_KERNEL);
13431323
if (!qda)

0 commit comments

Comments
 (0)