balance.c (c2c66aff) balance.c (4672b2ba)
1/* Copyright (c) Mark Harmstone 2016-17
2 *
3 * This file is part of WinBtrfs.
4 *
5 * WinBtrfs is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public Licence as published by
7 * the Free Software Foundation, either version 3 of the Licence, or
8 * (at your option) any later version.

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

2107 }
2108
2109 if (NT_SUCCESS(Status)) {
2110 clear_rollback(&rollback);
2111
2112 // update open FCBs
2113 // FIXME - speed this up(?)
2114
1/* Copyright (c) Mark Harmstone 2016-17
2 *
3 * This file is part of WinBtrfs.
4 *
5 * WinBtrfs is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public Licence as published by
7 * the Free Software Foundation, either version 3 of the Licence, or
8 * (at your option) any later version.

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

2107 }
2108
2109 if (NT_SUCCESS(Status)) {
2110 clear_rollback(&rollback);
2111
2112 // update open FCBs
2113 // FIXME - speed this up(?)
2114
2115 ExAcquireResourceSharedLite(&Vcb->fcb_lock, TRUE);
2115 acquire_fcb_lock_shared(Vcb);
2116
2117 le = Vcb->all_fcbs.Flink;
2118 while (le != &Vcb->all_fcbs) {
2119 struct _fcb* fcb = CONTAINING_RECORD(le, struct _fcb, list_entry_all);
2120 LIST_ENTRY* le2;
2121
2122 ExAcquireResourceExclusiveLite(fcb->Header.Resource, TRUE);
2123

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

2148 le2 = le2->Flink;
2149 }
2150
2151 ExReleaseResourceLite(fcb->Header.Resource);
2152
2153 le = le->Flink;
2154 }
2155
2116
2117 le = Vcb->all_fcbs.Flink;
2118 while (le != &Vcb->all_fcbs) {
2119 struct _fcb* fcb = CONTAINING_RECORD(le, struct _fcb, list_entry_all);
2120 LIST_ENTRY* le2;
2121
2122 ExAcquireResourceExclusiveLite(fcb->Header.Resource, TRUE);
2123

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

2148 le2 = le2->Flink;
2149 }
2150
2151 ExReleaseResourceLite(fcb->Header.Resource);
2152
2153 le = le->Flink;
2154 }
2155
2156 ExReleaseResourceLite(&Vcb->fcb_lock);
2156 release_fcb_lock(Vcb);
2157 } else
2158 do_rollback(Vcb, &rollback);
2159
2160 free_trees(Vcb);
2161
2162 ExReleaseResourceLite(&Vcb->tree_lock);
2163
2164 if (data)

--- 1723 unchanged lines hidden ---
2157 } else
2158 do_rollback(Vcb, &rollback);
2159
2160 free_trees(Vcb);
2161
2162 ExReleaseResourceLite(&Vcb->tree_lock);
2163
2164 if (data)

--- 1723 unchanged lines hidden ---