diff options
author | Jan Kara <jack@suse.cz> | 2012-07-09 17:38:36 -0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2012-07-09 17:38:36 -0400 |
commit | 349ecd6a3c0e4f97fa4dc6bd3917455ccc106d23 (patch) | |
tree | fab48fd2eb71c403f7509ad461db09b628022c34 /fs/jbd | |
parent | 17dc59ba418c3d6b0675d5b74d280acab2d4e369 (diff) |
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 <jack@suse.cz>
Diffstat (limited to 'fs/jbd')
-rw-r--r-- | fs/jbd/recovery.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/jbd/recovery.c b/fs/jbd/recovery.c index 008bf062fd26..a748fe21465a 100644 --- a/fs/jbd/recovery.c +++ b/fs/jbd/recovery.c | |||
@@ -265,8 +265,11 @@ int journal_recover(journal_t *journal) | |||
265 | if (!err) | 265 | if (!err) |
266 | err = err2; | 266 | err = err2; |
267 | /* Flush disk caches to get replayed data on the permanent storage */ | 267 | /* Flush disk caches to get replayed data on the permanent storage */ |
268 | if (journal->j_flags & JFS_BARRIER) | 268 | if (journal->j_flags & JFS_BARRIER) { |
269 | blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL); | 269 | err2 = blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL); |
270 | if (!err) | ||
271 | err = err2; | ||
272 | } | ||
270 | 273 | ||
271 | return err; | 274 | return err; |
272 | } | 275 | } |