Skip to contentSkip to conversation

gfs: don't check for AOP_WRITEPAGE_ACTIVATE in gfs2_write_jdata_batch

PATCH Applied Christoph Hellwig 2 participants 2 messages May 5, 2025 GFS2 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gfs: don't check for AOP_WRITEPAGE_ACTIVATE in gfs2_write_jdata_batch

__gfs2_jdata_write_folio can't return AOP_WRITEPAGE_ACTIVATE, so don't check for it in gfs2_write_jdata_batch.

---
 fs/gfs2/aops.c | 28 ++++++++++------------------
 1 file changed, 10 insertions(+), 18 deletions(-)
fs/gfs2/aops.c +10 -18
index 68fc8af14700..5be99d87bcdc 100644
@@ -228,24 +228,16 @@ static int gfs2_write_jdata_batch(struct address_space *mapping,
 
 		ret = __gfs2_jdata_write_folio(folio, wbc);
 		if (unlikely(ret)) {
-			if (ret == AOP_WRITEPAGE_ACTIVATE) {
-				folio_unlock(folio);
-				ret = 0;
-			} else {
-
-				/*
-				 * done_index is set past this page,
-				 * so media errors will not choke
-				 * background writeout for the entire
-				 * file. This has consequences for
-				 * range_cyclic semantics (ie. it may
-				 * not be suitable for data integrity
-				 * writeout).
-				 */
-				*done_index = folio_next_index(folio);
-				ret = 1;
-				break;
-			}
+			/*
+			 * done_index is set past this page, so media errors
+			 * will not choke background writeout for the entire
+			 * file. This has consequences for range_cyclic
+			 * semantics (ie. it may not be suitable for data
+			 * integrity writeout).
+			 */
+			*done_index = folio_next_index(folio);
+			ret = 1;
+			break;
 		}
 
 		/*
Signature · 1 line
2.47.2
maintainer Applied
#1 lore raw
Quoted 48 lines · Christoph Hellwig

__gfs2_jdata_write_folio can't return AOP_WRITEPAGE_ACTIVATE, so don't check for it in gfs2_write_jdata_batch.

---
 fs/gfs2/aops.c | 28 ++++++++++------------------
 1 file changed, 10 insertions(+), 18 deletions(-)
fs/gfs2/aops.c +10 -19
index 68fc8af14700..5be99d87bcdc 100644
@@ -228,24 +228,16 @@ static int gfs2_write_jdata_batch(struct address_space *mapping,
 
                ret = __gfs2_jdata_write_folio(folio, wbc);
                if (unlikely(ret)) {
-                       if (ret == AOP_WRITEPAGE_ACTIVATE) {
-                               folio_unlock(folio);
-                               ret = 0;
-                       } else {
-
-                               /*
-                                * done_index is set past this page,
-                                * so media errors will not choke
-                                * background writeout for the entire
-                                * file. This has consequences for
-                                * range_cyclic semantics (ie. it may
-                                * not be suitable for data integrity
-                                * writeout).
-                                */
-                               *done_index = folio_next_index(folio);
-                               ret = 1;
-                               break;
-                       }
+                       /*
+                        * done_index is set past this page, so media errors
+                        * will not choke background writeout for the entire
+                        * file. This has consequences for range_cyclic
+                        * semantics (ie. it may not be suitable for data
+                        * integrity writeout).
+                        */
+                       *done_index = folio_next_index(folio);
+                       ret = 1;
+                       break;
                }
 
                /*
--
Quoted 1 line

2.47.2

Applied to for-next, thanks.

Andreas