diff options
Diffstat (limited to 'fs/xfs/xfs_dquot.c')
-rw-r--r-- | fs/xfs/xfs_dquot.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c index f01012de06d0..0adf27ecf3f1 100644 --- a/fs/xfs/xfs_dquot.c +++ b/fs/xfs/xfs_dquot.c | |||
@@ -936,6 +936,7 @@ xfs_qm_dqput_final( | |||
936 | { | 936 | { |
937 | struct xfs_quotainfo *qi = dqp->q_mount->m_quotainfo; | 937 | struct xfs_quotainfo *qi = dqp->q_mount->m_quotainfo; |
938 | struct xfs_dquot *gdqp; | 938 | struct xfs_dquot *gdqp; |
939 | struct xfs_dquot *pdqp; | ||
939 | 940 | ||
940 | trace_xfs_dqput_free(dqp); | 941 | trace_xfs_dqput_free(dqp); |
941 | 942 | ||
@@ -949,21 +950,29 @@ xfs_qm_dqput_final( | |||
949 | 950 | ||
950 | /* | 951 | /* |
951 | * If we just added a udquot to the freelist, then we want to release | 952 | * If we just added a udquot to the freelist, then we want to release |
952 | * the gdquot reference that it (probably) has. Otherwise it'll keep | 953 | * the gdquot/pdquot reference that it (probably) has. Otherwise it'll |
953 | * the gdquot from getting reclaimed. | 954 | * keep the gdquot/pdquot from getting reclaimed. |
954 | */ | 955 | */ |
955 | gdqp = dqp->q_gdquot; | 956 | gdqp = dqp->q_gdquot; |
956 | if (gdqp) { | 957 | if (gdqp) { |
957 | xfs_dqlock(gdqp); | 958 | xfs_dqlock(gdqp); |
958 | dqp->q_gdquot = NULL; | 959 | dqp->q_gdquot = NULL; |
959 | } | 960 | } |
961 | |||
962 | pdqp = dqp->q_pdquot; | ||
963 | if (pdqp) { | ||
964 | xfs_dqlock(pdqp); | ||
965 | dqp->q_pdquot = NULL; | ||
966 | } | ||
960 | xfs_dqunlock(dqp); | 967 | xfs_dqunlock(dqp); |
961 | 968 | ||
962 | /* | 969 | /* |
963 | * If we had a group quota hint, release it now. | 970 | * If we had a group/project quota hint, release it now. |
964 | */ | 971 | */ |
965 | if (gdqp) | 972 | if (gdqp) |
966 | xfs_qm_dqput(gdqp); | 973 | xfs_qm_dqput(gdqp); |
974 | if (pdqp) | ||
975 | xfs_qm_dqput(pdqp); | ||
967 | } | 976 | } |
968 | 977 | ||
969 | /* | 978 | /* |