Эх сурвалжийг харах

Merge tag 'jfs-4.9' of git://github.com/kleikamp/linux-shaggy

Pull jfs updates from David Kleikamp:
 "Minor jfs updates"

* tag 'jfs-4.9' of git://github.com/kleikamp/linux-shaggy:
  jfs: Simplify code
  jfs: jump to error_out when filemap_{fdatawait, write_and_wait} fails
Linus Torvalds 9 жил өмнө
parent
commit
2105b9ff73

+ 1 - 2
fs/jfs/jfs_txnmgr.c

@@ -2893,8 +2893,7 @@ restart:
 	 * on anon_list2.  Let's check.
 	 */
 	if (!list_empty(&TxAnchor.anon_list2)) {
-		list_splice(&TxAnchor.anon_list2, &TxAnchor.anon_list);
-		INIT_LIST_HEAD(&TxAnchor.anon_list2);
+		list_splice_init(&TxAnchor.anon_list2, &TxAnchor.anon_list);
 		goto restart;
 	}
 	TXN_UNLOCK();

+ 8 - 2
fs/jfs/resize.c

@@ -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 */