[PATCH 11/14] xfs: remove log grant lock

Dave Chinner
2010-11-29T01:37:23Z

From: Dave Chinner <dchinner@redhat.com>

The log grant lock no longer protects anything, so remove the remaining
initialisation and teardown code that still exists.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
fs/xfs/xfs_log.c | 3 ---
fs/xfs/xfs_log_priv.h | 3 ---
2 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 50cf6af..d54d8f8 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -1118,7 +1118,6 @@ xlog_alloc_log(xfs_mount_t *mp,
log->l_xbuf = bp;

spin_lock_init(&log->l_icloglock);
- spin_lock_init(&log->l_grant_lock);
sv_init(&log->l_flush_wait, 0, "flush_wait");

/* log record size must be multiple of BBSIZE; see xlog_rec_header_t */
@@ -1199,7 +1198,6 @@ out_free_iclog:
kmem_free(iclog);
}
spinlock_destroy(&log->l_icloglock);
- spinlock_destroy(&log->l_grant_lock);
xfs_buf_free(log->l_xbuf);
out_free_log:
kmem_free(log);
@@ -1516,7 +1514,6 @@ xlog_dealloc_log(xlog_t *log)
iclog = next_iclog;
}
spinlock_destroy(&log->l_icloglock);
- spinlock_destroy(&log->l_grant_lock);

xfs_buf_free(log->l_xbuf);
log->l_mp->m_log = NULL;
diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h
index 621002c..cd62400 100644
--- a/fs/xfs/xfs_log_priv.h
+++ b/fs/xfs/xfs_log_priv.h
@@ -512,9 +512,6 @@ typedef struct log {
int l_curr_block; /* current logical log block */
int l_prev_block; /* previous logical log block */

- /* The following block of fields are changed while holding grant_lock */
- spinlock_t l_grant_lock ____cacheline_aligned_in_smp;
-
/*
* l_last_sync_lsn and l_tail_lsn are atomics so they can be set and
* read without needing to hold specific locks. To avoid operations
--
1.7.2.3