summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2012-08-17 09:56:17 -0400
committerTheodore Ts'o <tytso@mit.edu>2012-08-17 09:56:17 -0400
commit316e4cfd0b0b4ce846fd0fbda2deebcffbd3e440 (patch)
treea8ab826ad9dbbbc886e5112c8d56d591123b37af /fs
parent67a5da564f97f31c4054d358e00b34d7ee570da5 (diff)
downloadlinux-3.10-316e4cfd0b0b4ce846fd0fbda2deebcffbd3e440.tar.gz
linux-3.10-316e4cfd0b0b4ce846fd0fbda2deebcffbd3e440.tar.bz2
linux-3.10-316e4cfd0b0b4ce846fd0fbda2deebcffbd3e440.zip
jbd2: check return value of blkdev_issue_flush()
blkdev_issue_flush() can fail; make sure the error gets properly propagated. This is a port of the equivalent jbd patch from commit 349ecd6a3c0e. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs')
-rw-r--r--fs/jbd2/recovery.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c
index 0131e436253..626846bac32 100644
--- a/fs/jbd2/recovery.c
+++ b/fs/jbd2/recovery.c
@@ -289,8 +289,11 @@ int jbd2_journal_recover(journal_t *journal)
if (!err)
err = err2;
/* Make sure all replayed data is on permanent storage */
- if (journal->j_flags & JBD2_BARRIER)
- blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL);
+ if (journal->j_flags & JBD2_BARRIER) {
+ err2 = blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL);
+ if (!err)
+ err = err2;
+ }
return err;
}