]> Pileus Git - ~andy/linux/blobdiff - fs/xfs/xfs_dquot.h
arm64: perf: fix array out of bounds access in armpmu_map_hw_event()
[~andy/linux] / fs / xfs / xfs_dquot.h
index b596626249b84e9eb91d29a2b110e57532d46a60..55abbca2883d84231e7ca61a722f2b394b41376d 100644 (file)
@@ -53,6 +53,7 @@ typedef struct xfs_dquot {
        xfs_fileoff_t    q_fileoffset;  /* offset in quotas file */
 
        struct xfs_dquot*q_gdquot;      /* group dquot, hint only */
+       struct xfs_dquot*q_pdquot;      /* project dquot, hint only */
        xfs_disk_dquot_t q_core;        /* actual usage & quotas */
        xfs_dq_logitem_t q_logitem;     /* dquot log item */
        xfs_qcnt_t       q_res_bcount;  /* total regular nblks used+reserved */
@@ -118,8 +119,9 @@ static inline int xfs_this_quota_on(struct xfs_mount *mp, int type)
        case XFS_DQ_USER:
                return XFS_IS_UQUOTA_ON(mp);
        case XFS_DQ_GROUP:
+               return XFS_IS_GQUOTA_ON(mp);
        case XFS_DQ_PROJ:
-               return XFS_IS_OQUOTA_ON(mp);
+               return XFS_IS_PQUOTA_ON(mp);
        default:
                return 0;
        }
@@ -131,8 +133,9 @@ static inline xfs_dquot_t *xfs_inode_dquot(struct xfs_inode *ip, int type)
        case XFS_DQ_USER:
                return ip->i_udquot;
        case XFS_DQ_GROUP:
-       case XFS_DQ_PROJ:
                return ip->i_gdquot;
+       case XFS_DQ_PROJ:
+               return ip->i_pdquot;
        default:
                return NULL;
        }