Skip to contentSkip to conversation

GFS2: Remove bufdata from transactions to which they belong

PATCH New Bob Peterson 1 participant 1 message Apr 14, 2016 1 message not in the archive GFS2 file system

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 GFS2: Remove bufdata from transactions to which they belong

In reply to a message not in the archive

Hi,

This patch changes the call in function gfs2_discard so that it tries to remove the bufdata from the transaction to which it belongs rather than from the current transaction. That's because the page might be getting removed by way of a different process, one that has no GFS2 transaction, due to memory pressure.

---

fs/gfs2/aops.c +1 -1
index aa016e4..e93e337 100644
@@ -977,7 +977,7 @@ static void gfs2_discard(struct gfs2_sbd *sdp, struct buffer_head *bh)
 		if (!list_empty(&bd->bd_list) && !buffer_pinned(bh))
 			list_del_init(&bd->bd_list);
 		else
-			gfs2_remove_from_journal(bh, current->journal_info, 0);
+			gfs2_remove_from_journal(bh, bd->bd_tr, 0);
 	}
 	bh->b_bdev = NULL;
 	clear_buffer_mapped(bh);