]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/xfs/xfs_dquot.c
bfs: iget_locked() doesn't return an ERR_PTR
[karo-tx-linux.git] / fs / xfs / xfs_dquot.c
index f01012de06d0b3d3809c4dc2e09c9e5ba6f38982..0adf27ecf3f1cd4e98d8fcc06a732e4d476437db 100644 (file)
@@ -936,6 +936,7 @@ xfs_qm_dqput_final(
 {
        struct xfs_quotainfo    *qi = dqp->q_mount->m_quotainfo;
        struct xfs_dquot        *gdqp;
+       struct xfs_dquot        *pdqp;
 
        trace_xfs_dqput_free(dqp);
 
@@ -949,21 +950,29 @@ xfs_qm_dqput_final(
 
        /*
         * If we just added a udquot to the freelist, then we want to release
-        * the gdquot reference that it (probably) has. Otherwise it'll keep
-        * the gdquot from getting reclaimed.
+        * the gdquot/pdquot reference that it (probably) has. Otherwise it'll
+        * keep the gdquot/pdquot from getting reclaimed.
         */
        gdqp = dqp->q_gdquot;
        if (gdqp) {
                xfs_dqlock(gdqp);
                dqp->q_gdquot = NULL;
        }
+
+       pdqp = dqp->q_pdquot;
+       if (pdqp) {
+               xfs_dqlock(pdqp);
+               dqp->q_pdquot = NULL;
+       }
        xfs_dqunlock(dqp);
 
        /*
-        * If we had a group quota hint, release it now.
+        * If we had a group/project quota hint, release it now.
         */
        if (gdqp)
                xfs_qm_dqput(gdqp);
+       if (pdqp)
+               xfs_qm_dqput(pdqp);
 }
 
 /*