xfs
[Top] [All Lists]

[PATCH 24/22] xfs: Teach dquot recovery about CONFIG_XFS_QUOTA

To: xfs@xxxxxxxxxxx
Subject: [PATCH 24/22] xfs: Teach dquot recovery about CONFIG_XFS_QUOTA
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 9 Apr 2013 17:33:22 +1000
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1364965892-19623-1-git-send-email-david@xxxxxxxxxxxxx>
References: <1364965892-19623-1-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
From: Dave Chinner <dchinner@xxxxxxxxxx>

Fix a build error when CONFIG_XFS_QUOTA=n:

fs/built-in.o: In function `xlog_recovery_validate_buf_type':
/home/dave/src/build/x86-64/xfsdev/fs/xfs/xfs_log_recover.c:1948: undefined
reference to `xfs_dquot_buf_ops'

Reported-by: Michael L. Semon <mlsemon35@xxxxxxxxx>
Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
---
 fs/xfs/xfs_log_recover.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index 35ac504..1b32239 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -1940,12 +1940,18 @@ xlog_recovery_validate_buf_type(
        case XFS_BLFT_UDQUOT_BUF:
        case XFS_BLFT_PDQUOT_BUF:
        case XFS_BLFT_GDQUOT_BUF:
+#ifdef CONFIG_XFS_QUOTA
                if (magic16 != XFS_DQUOT_MAGIC) {
                        xfs_warn(mp, "Bad DQUOT block magic!");
                        ASSERT(0);
                        break;
                }
                bp->b_ops = &xfs_dquot_buf_ops;
+#else
+               xfs_alert(mp,
+       "Trying to recover dquots without QUOTA support built in!");
+               ASSERT(0);
+#endif
                break;
        case XFS_BLFT_DINO_BUF:
                /*

<Prev in Thread] Current Thread [Next in Thread>