]> Pileus Git - ~andy/linux/blobdiff - fs/xfs/xfs_dquot.c
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
[~andy/linux] / fs / xfs / xfs_dquot.c
index 36e1cf32f741255e3207a5d34e70ee89134c951d..71520e6e5d65048c04996133621b2916653b5c31 100644 (file)
@@ -29,6 +29,7 @@
 #include "xfs_bmap_btree.h"
 #include "xfs_inode.h"
 #include "xfs_bmap.h"
+#include "xfs_bmap_util.h"
 #include "xfs_rtalloc.h"
 #include "xfs_error.h"
 #include "xfs_itable.h"
@@ -711,10 +712,8 @@ xfs_qm_dqread(
 
        if (flags & XFS_QMOPT_DQALLOC) {
                tp = xfs_trans_alloc(mp, XFS_TRANS_QM_DQALLOC);
-               error = xfs_trans_reserve(tp, XFS_QM_DQALLOC_SPACE_RES(mp),
-                                         XFS_QM_DQALLOC_LOG_RES(mp), 0,
-                                         XFS_TRANS_PERM_LOG_RES,
-                                         XFS_WRITE_LOG_COUNT);
+               error = xfs_trans_reserve(tp, &M_RES(mp)->tr_attrsetm,
+                                         XFS_QM_DQALLOC_SPACE_RES(mp), 0);
                if (error)
                        goto error1;
                cancelflags = XFS_TRANS_RELEASE_LOG_RES;
@@ -941,13 +940,8 @@ xfs_qm_dqput_final(
 
        trace_xfs_dqput_free(dqp);
 
-       mutex_lock(&qi->qi_lru_lock);
-       if (list_empty(&dqp->q_lru)) {
-               list_add_tail(&dqp->q_lru, &qi->qi_lru_list);
-               qi->qi_lru_count++;
+       if (list_lru_add(&qi->qi_lru, &dqp->q_lru))
                XFS_STATS_INC(xs_qm_dquot_unused);
-       }
-       mutex_unlock(&qi->qi_lru_lock);
 
        /*
         * If we just added a udquot to the freelist, then we want to release