]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/xfs/xfs_iomap.c
xfs: check for null dquot in xfs_quota_calc_throttle()
[mirror_ubuntu-artful-kernel.git] / fs / xfs / xfs_iomap.c
index e9c47b6f5e5a97f3b100a4a6262a1c26a1b01de9..afcf3c926565f940e2986093e7e3491296466d9b 100644 (file)
@@ -404,8 +404,8 @@ xfs_quota_calc_throttle(
        int shift = 0;
        struct xfs_dquot *dq = xfs_inode_dquot(ip, type);
 
-       /* over hi wmark, squash the prealloc completely */
-       if (dq->q_res_bcount >= dq->q_prealloc_hi_wmark) {
+       /* no dq, or over hi wmark, squash the prealloc completely */
+       if (!dq || dq->q_res_bcount >= dq->q_prealloc_hi_wmark) {
                *qblocks = 0;
                *qfreesp = 0;
                return;