提交 a56fca23 编写于 作者: C Christoph Hellwig 提交者: Jan Kara

quota: remove invalid optimization from quota_sync_all

Checking the "VFS" quota enabled and dirty bits from generic code means
this code will never get called for other implementations, e.g. XFS and
GFS2.  Grabbing the reference on the superblock really isn't much overhead
for a global Q_SYNC call, so just drop this optimization.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NJan Kara <jack@suse.cz>
上级 5fb324ad
...@@ -51,7 +51,6 @@ static int check_quotactl_permission(struct super_block *sb, int type, int cmd, ...@@ -51,7 +51,6 @@ static int check_quotactl_permission(struct super_block *sb, int type, int cmd,
static int quota_sync_all(int type) static int quota_sync_all(int type)
{ {
struct super_block *sb; struct super_block *sb;
int cnt;
int ret; int ret;
if (type >= MAXQUOTAS) if (type >= MAXQUOTAS)
...@@ -66,20 +65,6 @@ static int quota_sync_all(int type) ...@@ -66,20 +65,6 @@ static int quota_sync_all(int type)
if (!sb->s_qcop || !sb->s_qcop->quota_sync) if (!sb->s_qcop || !sb->s_qcop->quota_sync)
continue; continue;
/* This test just improves performance so it needn't be
* reliable... */
for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
if (type != -1 && type != cnt)
continue;
if (!sb_has_quota_active(sb, cnt))
continue;
if (!info_dirty(&sb_dqopt(sb)->info[cnt]) &&
list_empty(&sb_dqopt(sb)->info[cnt].dqi_dirty_list))
continue;
break;
}
if (cnt == MAXQUOTAS)
continue;
sb->s_count++; sb->s_count++;
spin_unlock(&sb_lock); spin_unlock(&sb_lock);
down_read(&sb->s_umount); down_read(&sb->s_umount);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册