[PATCH] Don't clobber wait_queue_head while there are waitors on it (1 of 3)
[email protected] (Dave Kleikamp) Wed, 23 Mar 2005 16:59:44 -0600 (CST)
| Newsgroups | gmane.comp.file-systems.jfs.patches |
|---|---|
| Message-ID | <[email protected]> |
# This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2005/03/15 09:16:28-06:00 [email protected] # JFS: Don't clobber wait_queue_head while there are waitors on it # # The resize code closes down the log and reinitializes it in another location # on the disk. The problem is that it re-initializes a wait_queue_head while # there are waitors waiting for the resize to be completed. The result # is that the waitors are never awakened. # # Signed-off-by: Dave Kleikamp <[email protected]> # diff -Nru a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c --- a/fs/jfs/jfs_logmgr.c 2005-03-23 16:56:58 -06:00 +++ b/fs/jfs/jfs_logmgr.c 2005-03-23 16:56:58 -06:00 @@ -1119,6 +1119,7 @@ } memset(log, 0, sizeof(struct jfs_log)); INIT_LIST_HEAD(&log->sb_list); + init_waitqueue_head(&log->syncwait); /* * external log as separate logical volume @@ -1192,6 +1193,7 @@ return -ENOMEM; memset(log, 0, sizeof(struct jfs_log)); INIT_LIST_HEAD(&log->sb_list); + init_waitqueue_head(&log->syncwait); set_bit(log_INLINELOG, &log->flag); log->bdev = sb->s_bdev; @@ -1229,6 +1231,7 @@ } memset(dummy_log, 0, sizeof(struct jfs_log)); INIT_LIST_HEAD(&dummy_log->sb_list); + init_waitqueue_head(&dummy_log->syncwait); dummy_log->no_integrity = 1; /* Make up some stuff */ dummy_log->base = 0; @@ -1290,8 +1293,6 @@ LOGSYNC_LOCK_INIT(log); INIT_LIST_HEAD(&log->synclist); - - init_waitqueue_head(&log->syncwait); INIT_LIST_HEAD(&log->cqueue); log->flush_tblk = NULL; ------------------------------------------------------- This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005 Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click