[PATCH] fix panics while backing up LVM snapshots
Linux Kernel Mailing List <[email protected]>
| Newsgroups | gmane.linux.kernel.commits.2-4 |
|---|---|
| Message-ID | <[email protected]> |
ChangeSet 1.1575, 2005/01/26 10:10:40-02:00, [email protected] [PATCH] fix panics while backing up LVM snapshots this patch fixes lvm-snap.c in order to avoid a list update on the snapshot exception hash happening while only holding a read lock as documented in Red Hat bugzilla #135266. lvm-snap.c | 7 ------- 1 files changed, 7 deletions(-) diff -Nru a/drivers/md/lvm-snap.c b/drivers/md/lvm-snap.c --- a/drivers/md/lvm-snap.c 2005-01-30 15:36:30 -08:00 +++ b/drivers/md/lvm-snap.c 2005-01-30 15:36:30 -08:00 @@ -119,7 +119,6 @@ unsigned long mask = lv->lv_snapshot_hash_mask; int chunk_size = lv->lv_chunk_size; lv_block_exception_t *ret; - int i = 0; hash_table = &hash_table[hashfn(org_dev, org_start, mask, chunk_size)]; @@ -132,15 +131,9 @@ exception = list_entry(next, lv_block_exception_t, hash); if (exception->rsector_org == org_start && exception->rdev_org == org_dev) { - if (i) { - /* fun, isn't it? :) */ - list_del(next); - list_add(next, hash_table); - } ret = exception; break; } - i++; } return ret; }