From 425832d7a7fbd91769f29b58bf30da558b3ca37a Mon Sep 17 00:00:00 2001 From: zam Date: Tue, 13 Oct 2009 11:40:48 +0000 Subject: [PATCH] Branch HEAD b=20740 i=alexey.lyashkov i=andrew.perepechko replace client_obd_list_is_locked and the corresponding assertions in the osc code by ASSERT_SPIN_LOCKED() because the first doesn't work correctly w/o CONFIG_SMP on. --- lustre/include/linux/obd.h | 6 ------ lustre/osc/osc_request.c | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/lustre/include/linux/obd.h b/lustre/include/linux/obd.h index ce620f9..1ce61a9 100644 --- a/lustre/include/linux/obd.h +++ b/lustre/include/linux/obd.h @@ -135,12 +135,6 @@ static inline void client_obd_list_lock_init(client_obd_lock_t *lock) static inline void client_obd_list_lock_done(client_obd_lock_t *lock) {} - -static inline int client_obd_list_is_locked(client_obd_lock_t *lock) -{ - return spin_is_locked(&lock->lock); -} - #if defined(__KERNEL__) && !defined(HAVE_ADLER) /* zlib_adler() is an inline function defined in zutil.h */ #define HAVE_ADLER diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 674be0c..d00ab5f 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -806,7 +806,7 @@ static void osc_update_next_shrink(struct client_obd *cli) static void osc_consume_write_grant(struct client_obd *cli, struct brw_page *pga) { - LASSERT(client_obd_list_is_locked(&cli->cl_loi_list_lock)); + LASSERT_SPIN_LOCKED(&cli->cl_loi_list_lock.lock); LASSERT(!(pga->flag & OBD_BRW_FROM_GRANT)); atomic_inc(&obd_dirty_pages); cli->cl_dirty += CFS_PAGE_SIZE; @@ -826,7 +826,7 @@ static void osc_release_write_grant(struct client_obd *cli, int blocksize = cli->cl_import->imp_obd->obd_osfs.os_bsize ? : 4096; ENTRY; - LASSERT(client_obd_list_is_locked(&cli->cl_loi_list_lock)); + LASSERT_SPIN_LOCKED(&cli->cl_loi_list_lock.lock); if (!(pga->flag & OBD_BRW_FROM_GRANT)) { EXIT; return; -- 1.8.3.1