hc
2024-02-19 151fecfb72a0d602dfe79790602ef64b4e241574
kernel/fs/xfs/xfs_qm_bhv.c
....@@ -5,13 +5,13 @@
55 */
66 #include "xfs.h"
77 #include "xfs_fs.h"
8
+#include "xfs_shared.h"
89 #include "xfs_format.h"
910 #include "xfs_log_format.h"
1011 #include "xfs_trans_resv.h"
1112 #include "xfs_quota.h"
1213 #include "xfs_mount.h"
1314 #include "xfs_inode.h"
14
-#include "xfs_error.h"
1515 #include "xfs_trans.h"
1616 #include "xfs_qm.h"
1717
....@@ -23,24 +23,24 @@
2323 {
2424 uint64_t limit;
2525
26
- limit = dqp->q_core.d_blk_softlimit ?
27
- be64_to_cpu(dqp->q_core.d_blk_softlimit) :
28
- be64_to_cpu(dqp->q_core.d_blk_hardlimit);
26
+ limit = dqp->q_blk.softlimit ?
27
+ dqp->q_blk.softlimit :
28
+ dqp->q_blk.hardlimit;
2929 if (limit && statp->f_blocks > limit) {
3030 statp->f_blocks = limit;
3131 statp->f_bfree = statp->f_bavail =
32
- (statp->f_blocks > dqp->q_res_bcount) ?
33
- (statp->f_blocks - dqp->q_res_bcount) : 0;
32
+ (statp->f_blocks > dqp->q_blk.reserved) ?
33
+ (statp->f_blocks - dqp->q_blk.reserved) : 0;
3434 }
3535
36
- limit = dqp->q_core.d_ino_softlimit ?
37
- be64_to_cpu(dqp->q_core.d_ino_softlimit) :
38
- be64_to_cpu(dqp->q_core.d_ino_hardlimit);
36
+ limit = dqp->q_ino.softlimit ?
37
+ dqp->q_ino.softlimit :
38
+ dqp->q_ino.hardlimit;
3939 if (limit && statp->f_files > limit) {
4040 statp->f_files = limit;
4141 statp->f_ffree =
42
- (statp->f_files > dqp->q_res_icount) ?
43
- (statp->f_files - dqp->q_res_icount) : 0;
42
+ (statp->f_files > dqp->q_ino.reserved) ?
43
+ (statp->f_files - dqp->q_ino.reserved) : 0;
4444 }
4545 }
4646
....@@ -54,13 +54,13 @@
5454 */
5555 void
5656 xfs_qm_statvfs(
57
- xfs_inode_t *ip,
57
+ struct xfs_inode *ip,
5858 struct kstatfs *statp)
5959 {
60
- xfs_mount_t *mp = ip->i_mount;
61
- xfs_dquot_t *dqp;
60
+ struct xfs_mount *mp = ip->i_mount;
61
+ struct xfs_dquot *dqp;
6262
63
- if (!xfs_qm_dqget(mp, xfs_get_projid(ip), XFS_DQ_PROJ, false, &dqp)) {
63
+ if (!xfs_qm_dqget(mp, ip->i_d.di_projid, XFS_DQTYPE_PROJ, false, &dqp)) {
6464 xfs_fill_statvfs_from_dquot(statp, dqp);
6565 xfs_qm_dqput(dqp);
6666 }