summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGu Zheng <guz.fnst@cn.fujitsu.com>2013-05-23 12:14:19 +0400
committerDave Kleikamp <dave.kleikamp@oracle.com>2013-05-25 01:03:47 +0400
commit95bbb82f60c80808e5a49d8233c2de8451901531 (patch)
treec03a69d85d80ee6155700e2c9a7e87d90bba42b3
parente9b376671910d105c5e61103111b96209c729529 (diff)
downloadlinux-95bbb82f60c80808e5a49d8233c2de8451901531.tar.xz
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));