Whamcloud - gitweb
Branch HEAD
authorzam <zam>
Tue, 13 Oct 2009 11:40:48 +0000 (11:40 +0000)
committerzam <zam>
Tue, 13 Oct 2009 11:40:48 +0000 (11:40 +0000)
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
lustre/osc/osc_request.c

index ce620f9..1ce61a9 100644 (file)
@@ -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
index 674be0c..d00ab5f 100644 (file)
@@ -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;