summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/repair.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/scrub/repair.c')
-rw-r--r--fs/xfs/scrub/repair.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/fs/xfs/scrub/repair.c b/fs/xfs/scrub/repair.c
index 8d04afffc21b..f98d2763918b 100644
--- a/fs/xfs/scrub/repair.c
+++ b/fs/xfs/scrub/repair.c
@@ -42,6 +42,7 @@
#include "scrub/trace.h"
#include "scrub/repair.h"
#include "scrub/bitmap.h"
+#include "scrub/xfile.h"
/*
* Attempt to repair some metadata, if the metadata is corrupt and userspace
@@ -167,9 +168,21 @@ int
xrep_roll_trans(
struct xfs_scrub *sc)
{
+ int error;
+
if (!sc->ip)
return xrep_roll_ag_trans(sc);
- return xfs_trans_roll_inode(&sc->tp, sc->ip);
+
+ /*
+ * Roll the transaction with the inode we're fixing and the temp inode,
+ * so that neither can pin the log.
+ */
+ if (sc->tempip)
+ xfs_trans_log_inode(sc->tp, sc->tempip, XFS_ILOG_CORE);
+ error = xfs_trans_roll_inode(&sc->tp, sc->ip);
+ if (sc->tempip)
+ xfs_trans_ijoin(sc->tp, sc->tempip, 0);
+ return error;
}
/*