lops.c (c37fe6aff89cb0d842993fe2f69e48bf3ebe0ab0) lops.c (f5456b5d67cf812fd31fe3e130ca216b2e0908e5)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
4 * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved.
5 */
6
7#include <linux/sched.h>
8#include <linux/slab.h>

--- 871 unchanged lines hidden (view full) ---

880 *(__be64 *)(page_address(page) + offset) = cpu_to_be64(bd->bd_blkno);
881 offset += sizeof(u64);
882 }
883 gfs2_assert_withdraw(sdp, !sdp->sd_log_num_revoke);
884
885 gfs2_log_write_page(sdp, page);
886}
887
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
4 * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved.
5 */
6
7#include <linux/sched.h>
8#include <linux/slab.h>

--- 871 unchanged lines hidden (view full) ---

880 *(__be64 *)(page_address(page) + offset) = cpu_to_be64(bd->bd_blkno);
881 offset += sizeof(u64);
882 }
883 gfs2_assert_withdraw(sdp, !sdp->sd_log_num_revoke);
884
885 gfs2_log_write_page(sdp, page);
886}
887
888static void revoke_lo_after_commit(struct gfs2_sbd *sdp, struct gfs2_trans *tr)
888void gfs2_drain_revokes(struct gfs2_sbd *sdp)
889{
890 struct list_head *head = &sdp->sd_log_revokes;
891 struct gfs2_bufdata *bd;
892 struct gfs2_glock *gl;
893
894 while (!list_empty(head)) {
895 bd = list_first_entry(head, struct gfs2_bufdata, bd_list);
896 list_del_init(&bd->bd_list);
897 gl = bd->bd_gl;
898 gfs2_glock_remove_revoke(gl);
899 kmem_cache_free(gfs2_bufdata_cachep, bd);
900 }
901}
902
889{
890 struct list_head *head = &sdp->sd_log_revokes;
891 struct gfs2_bufdata *bd;
892 struct gfs2_glock *gl;
893
894 while (!list_empty(head)) {
895 bd = list_first_entry(head, struct gfs2_bufdata, bd_list);
896 list_del_init(&bd->bd_list);
897 gl = bd->bd_gl;
898 gfs2_glock_remove_revoke(gl);
899 kmem_cache_free(gfs2_bufdata_cachep, bd);
900 }
901}
902
903static void revoke_lo_after_commit(struct gfs2_sbd *sdp, struct gfs2_trans *tr)
904{
905 gfs2_drain_revokes(sdp);
906}
907
903static void revoke_lo_before_scan(struct gfs2_jdesc *jd,
904 struct gfs2_log_header_host *head, int pass)
905{
906 if (pass != 0)
907 return;
908
909 jd->jd_found_revokes = 0;
910 jd->jd_replay_tail = head->lh_tail;

--- 204 unchanged lines hidden ---
908static void revoke_lo_before_scan(struct gfs2_jdesc *jd,
909 struct gfs2_log_header_host *head, int pass)
910{
911 if (pass != 0)
912 return;
913
914 jd->jd_found_revokes = 0;
915 jd->jd_replay_tail = head->lh_tail;

--- 204 unchanged lines hidden ---