summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2006-07-28 17:04:26 +1000
committerNathan Scott <nathans@sgi.com>2006-07-28 17:04:26 +1000
commit2a293b7d5aa2f0d1e3d87b642f7ac263c2d664e3 (patch)
tree8d2f8fb9cb26e482e8637797f2262fa8a19cc50b /fs
parent64821324ca49f24be1a66f2f432108f96a24e596 (diff)
downloadop-kernel-dev-2a293b7d5aa2f0d1e3d87b642f7ac263c2d664e3.zip
op-kernel-dev-2a293b7d5aa2f0d1e3d87b642f7ac263c2d664e3.tar.gz
[XFS] All xfs_disk_dquot_t values are (as the name says) disk endian.
Before putting them into struct statfs they should be endian-swapped. SGI-PV: 954580 SGI-Modid: xfs-linux-melb:xfs-kern:26550a Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/quota/xfs_qm_bhv.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/fs/xfs/quota/xfs_qm_bhv.c b/fs/xfs/quota/xfs_qm_bhv.c
index e95e99f..f137856 100644
--- a/fs/xfs/quota/xfs_qm_bhv.c
+++ b/fs/xfs/quota/xfs_qm_bhv.c
@@ -217,17 +217,24 @@ xfs_qm_statvfs(
return 0;
dp = &dqp->q_core;
- limit = dp->d_blk_softlimit ? dp->d_blk_softlimit : dp->d_blk_hardlimit;
+ limit = dp->d_blk_softlimit ?
+ be64_to_cpu(dp->d_blk_softlimit) :
+ be64_to_cpu(dp->d_blk_hardlimit);
if (limit && statp->f_blocks > limit) {
statp->f_blocks = limit;
- statp->f_bfree = (statp->f_blocks > dp->d_bcount) ?
- (statp->f_blocks - dp->d_bcount) : 0;
+ statp->f_bfree =
+ (statp->f_blocks > be64_to_cpu(dp->d_bcount)) ?
+ (statp->f_blocks - be64_to_cpu(dp->d_bcount)) : 0;
}
- limit = dp->d_ino_softlimit ? dp->d_ino_softlimit : dp->d_ino_hardlimit;
+
+ limit = dp->d_ino_softlimit ?
+ be64_to_cpu(dp->d_ino_softlimit) :
+ be64_to_cpu(dp->d_ino_hardlimit);
if (limit && statp->f_files > limit) {
statp->f_files = limit;
- statp->f_ffree = (statp->f_files > dp->d_icount) ?
- (statp->f_ffree - dp->d_icount) : 0;
+ statp->f_ffree =
+ (statp->f_files > be64_to_cpu(dp->d_icount)) ?
+ (statp->f_ffree - be64_to_cpu(dp->d_icount)) : 0;
}
xfs_qm_dqput(dqp);
OpenPOWER on IntegriCloud