aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_qm_syscalls.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_qm_syscalls.c')
-rw-r--r--fs/xfs/xfs_qm_syscalls.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/fs/xfs/xfs_qm_syscalls.c b/fs/xfs/xfs_qm_syscalls.c
index 437c9198031a..3daf5ea1eb8d 100644
--- a/fs/xfs/xfs_qm_syscalls.c
+++ b/fs/xfs/xfs_qm_syscalls.c
@@ -278,7 +278,7 @@ xfs_qm_scall_trunc_qfiles(
278 xfs_mount_t *mp, 278 xfs_mount_t *mp,
279 uint flags) 279 uint flags)
280{ 280{
281 int error = 0, error2 = 0; 281 int error;
282 282
283 if (!xfs_sb_version_hasquota(&mp->m_sb) || flags == 0) { 283 if (!xfs_sb_version_hasquota(&mp->m_sb) || flags == 0) {
284 xfs_debug(mp, "%s: flags=%x m_qflags=%x", 284 xfs_debug(mp, "%s: flags=%x m_qflags=%x",
@@ -286,14 +286,20 @@ xfs_qm_scall_trunc_qfiles(
286 return XFS_ERROR(EINVAL); 286 return XFS_ERROR(EINVAL);
287 } 287 }
288 288
289 if (flags & XFS_DQ_USER) 289 if (flags & XFS_DQ_USER) {
290 error = xfs_qm_scall_trunc_qfile(mp, mp->m_sb.sb_uquotino); 290 error = xfs_qm_scall_trunc_qfile(mp, mp->m_sb.sb_uquotino);
291 if (flags & XFS_DQ_GROUP) 291 if (error)
292 error2 = xfs_qm_scall_trunc_qfile(mp, mp->m_sb.sb_gquotino); 292 return error;
293 }
294 if (flags & XFS_DQ_GROUP) {
295 error = xfs_qm_scall_trunc_qfile(mp, mp->m_sb.sb_gquotino);
296 if (error)
297 return error;
298 }
293 if (flags & XFS_DQ_PROJ) 299 if (flags & XFS_DQ_PROJ)
294 error2 = xfs_qm_scall_trunc_qfile(mp, mp->m_sb.sb_pquotino); 300 error = xfs_qm_scall_trunc_qfile(mp, mp->m_sb.sb_pquotino);
295 301
296 return error ? error : error2; 302 return error;
297} 303}
298 304
299/* 305/*