#include <sys/mount.h>
#include <sys/kernel.h>
#include <sys/syslog.h>
+#include <sys/quota.h>
#include <sys/vm.h>
goto nospace;
VOP_DEVBLOCKSIZE(ip->i_devvp,&devBlockSize);
#if QUOTA
- if (error = chkdq(ip, (long)btodb(size, devBlockSize), cred, 0))
+ if (error = chkdq(ip, (int64_t)size, cred, 0))
return (error);
#endif /* QUOTA */
if (bpref >= fs->fs_size)
/*
* Restore user's disk quota because allocation failed.
*/
- (void) chkdq(ip, (long)-btodb(size, devBlockSize), cred, FORCE);
+ (void) chkdq(ip, (int64_t)-size, cred, FORCE);
#endif /* QUOTA */
nospace:
ffs_fserr(fs, cred->cr_uid, "file system full");
VOP_DEVBLOCKSIZE(ip->i_devvp,&devBlockSize);
#if QUOTA
- if (error = chkdq(ip, (long)btodb(nsize - osize, devBlockSize), cred, 0))
+ if (error = chkdq(ip, (int64_t)(nsize - osize), cred, 0))
{
brelse(bp);
return (error);
/*
* Restore user's disk quota because allocation failed.
*/
- (void) chkdq(ip, (long)-btodb(nsize - osize, devBlockSize), cred, FORCE);
+ (void) chkdq(ip, (int64_t)-(nsize - osize), cred, FORCE);
#endif /* QUOTA */
brelse(bp);
nospace: