summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGu Zheng <guz.fnst@cn.fujitsu.com>2013-05-23 10:14:19 +0200
committerDave Kleikamp <dave.kleikamp@oracle.com>2013-05-24 23:03:47 +0200
commit95bbb82f60c80808e5a49d8233c2de8451901531 (patch)
treec03a69d85d80ee6155700e2c9a7e87d90bba42b3
parentjfs: Several bugs in jfs_freeze() and jfs_unfreeze() (diff)
downloadlinux-95bbb82f60c80808e5a49d8233c2de8451901531.tar.xz
linux-95bbb82f60c80808e5a49d8233c2de8451901531.zip
fs/jfs: Add check if journaling to disk has been disabled in lbmRead()
Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com> Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
-rw-r--r--fs/jfs/jfs_logmgr.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c
index c57499dca89c..360d27c48887 100644
--- a/fs/jfs/jfs_logmgr.c
+++ b/fs/jfs/jfs_logmgr.c
@@ -2009,7 +2009,13 @@ static int lbmRead(struct jfs_log * log, int pn, struct lbuf ** bpp)
bio->bi_end_io = lbmIODone;
bio->bi_private = bp;
- submit_bio(READ_SYNC, bio);
+ /*check if journaling to disk has been disabled*/
+ if (log->no_integrity) {
+ bio->bi_size = 0;
+ lbmIODone(bio, 0);
+ } else {
+ submit_bio(READ_SYNC, bio);
+ }
wait_event(bp->l_ioevent, (bp->l_flag != lbmREAD));