Skip to content

Commit

Permalink
jfs: jump to error_out when filemap_{fdatawait, write_and_wait} fails
Browse files Browse the repository at this point in the history
filemap_fdatawait/filemap_write_and_wait may fail, so check the return
value and jump to error_out in the case of error.

Signed-off-by: Quorum Laval <quorum.laval@gmail.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
  • Loading branch information
Quorum Laval authored and Dave Kleikamp committed Aug 29, 2016
1 parent b892772 commit 7cfcd8b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions fs/jfs/resize.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,14 @@ int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize)
* cached in meta-data cache, and not written out
* by txCommit();
*/
filemap_fdatawait(ipbmap->i_mapping);
filemap_write_and_wait(ipbmap->i_mapping);
rc = filemap_fdatawait(ipbmap->i_mapping);
if (rc)
goto error_out;

rc = filemap_write_and_wait(ipbmap->i_mapping);
if (rc)
goto error_out;

diWriteSpecial(ipbmap, 0);

newPage = nPages; /* first new page number */
Expand Down

0 comments on commit 7cfcd8b

Please sign in to comment.