From: Jan Kara Date: Mon, 9 Jul 2012 21:38:36 +0000 (+0200) Subject: jbd: Check return value of blkdev_issue_flush() X-Git-Tag: upstream/snapshot3+hdmi~6979^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=349ecd6a3c0e4f97fa4dc6bd3917455ccc106d23;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git jbd: Check return value of blkdev_issue_flush() blkdev_issue_flush() can fail. Make sure the error gets properly propagated. Signed-off-by: Jan Kara --- diff --git a/fs/jbd/recovery.c b/fs/jbd/recovery.c index 008bf06..a748fe2 100644 --- a/fs/jbd/recovery.c +++ b/fs/jbd/recovery.c @@ -265,8 +265,11 @@ int journal_recover(journal_t *journal) if (!err) err = err2; /* Flush disk caches to get replayed data on the permanent storage */ - if (journal->j_flags & JFS_BARRIER) - blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL); + if (journal->j_flags & JFS_BARRIER) { + err2 = blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL); + if (!err) + err = err2; + } return err; }