diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c index 306165e61438..0384875fba6c 100644 --- a/fs/jfs/jfs_logmgr.c +++ b/fs/jfs/jfs_logmgr.c @@ -52,6 +52,7 @@ #include #include #include /* for sync_blockdev() */ +#include /* for bdev_count_inflight() */ #include #include #include @@ -1855,6 +1856,9 @@ static void lbmLogShutdown(struct jfs_log * log) jfs_info("lbmLogShutdown: log:0x%p", log); + while (bdev_count_inflight(file_bdev(log->bdev_file))) + cpu_relax(); + lbuf = log->lbuf_free; while (lbuf) { struct lbuf *next = lbuf->l_freelist;