mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
xfs: move the flags argument of xfs_qm_scall_trunc_qfiles to XFS_QMOPT_*
Since xfs_qm_scall_trunc_qfiles can take a bitset of quota types that we want to truncate, change the flags argument to take XFS_QMOPT_[UGP}QUOTA so that the next patch can start to deprecate XFS_DQ_*. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
This commit is contained in:
parent
afeda6000b
commit
41ed4a5f2b
2 changed files with 7 additions and 7 deletions
|
@ -322,23 +322,23 @@ xfs_qm_scall_trunc_qfiles(
|
||||||
int error = -EINVAL;
|
int error = -EINVAL;
|
||||||
|
|
||||||
if (!xfs_sb_version_hasquota(&mp->m_sb) || flags == 0 ||
|
if (!xfs_sb_version_hasquota(&mp->m_sb) || flags == 0 ||
|
||||||
(flags & ~XFS_DQ_ALLTYPES)) {
|
(flags & ~XFS_QMOPT_QUOTALL)) {
|
||||||
xfs_debug(mp, "%s: flags=%x m_qflags=%x",
|
xfs_debug(mp, "%s: flags=%x m_qflags=%x",
|
||||||
__func__, flags, mp->m_qflags);
|
__func__, flags, mp->m_qflags);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags & XFS_DQ_USER) {
|
if (flags & XFS_QMOPT_UQUOTA) {
|
||||||
error = xfs_qm_scall_trunc_qfile(mp, mp->m_sb.sb_uquotino);
|
error = xfs_qm_scall_trunc_qfile(mp, mp->m_sb.sb_uquotino);
|
||||||
if (error)
|
if (error)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
if (flags & XFS_DQ_GROUP) {
|
if (flags & XFS_QMOPT_GQUOTA) {
|
||||||
error = xfs_qm_scall_trunc_qfile(mp, mp->m_sb.sb_gquotino);
|
error = xfs_qm_scall_trunc_qfile(mp, mp->m_sb.sb_gquotino);
|
||||||
if (error)
|
if (error)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
if (flags & XFS_DQ_PROJ)
|
if (flags & XFS_QMOPT_PQUOTA)
|
||||||
error = xfs_qm_scall_trunc_qfile(mp, mp->m_sb.sb_pquotino);
|
error = xfs_qm_scall_trunc_qfile(mp, mp->m_sb.sb_pquotino);
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
|
|
|
@ -205,11 +205,11 @@ xfs_fs_rm_xquota(
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (uflags & FS_USER_QUOTA)
|
if (uflags & FS_USER_QUOTA)
|
||||||
flags |= XFS_DQ_USER;
|
flags |= XFS_QMOPT_UQUOTA;
|
||||||
if (uflags & FS_GROUP_QUOTA)
|
if (uflags & FS_GROUP_QUOTA)
|
||||||
flags |= XFS_DQ_GROUP;
|
flags |= XFS_QMOPT_GQUOTA;
|
||||||
if (uflags & FS_PROJ_QUOTA)
|
if (uflags & FS_PROJ_QUOTA)
|
||||||
flags |= XFS_DQ_PROJ;
|
flags |= XFS_QMOPT_PQUOTA;
|
||||||
|
|
||||||
return xfs_qm_scall_trunc_qfiles(mp, flags);
|
return xfs_qm_scall_trunc_qfiles(mp, flags);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue