[prev in list] [next in list] [prev in thread] [next in thread]
List: dm-devel
Subject: [dm-devel] [PATCH 13 of 17] dm-snap-possible-code-optimization.patch
From: Jonathan Brassow <jbrassow () redhat ! com>
Date: 2009-02-20 23:28:35
Message-ID: 1235172515.24593.45.camel () hydrogen ! msp ! redhat ! com
[Download RAW message or body]
Minor code clean-up. The reason I broke this out into a separate
patch is so people can check if I'm not missing anything... I
don't see a reason to check 's->valid' separately anymore.
RFC-by: Jonathan Brassow <jbrassow@redhat.com>
Index: linux-2.6/drivers/md/dm-snap.c
===================================================================
--- linux-2.6.orig/drivers/md/dm-snap.c
+++ linux-2.6/drivers/md/dm-snap.c
@@ -740,20 +740,14 @@ static void pending_complete(struct dm_s
struct bio *snapshot_bios = NULL;
int error = 0;
+ down_write(&s->lock);
if (!success) {
/* Read/write error - snapshot is unusable */
- down_write(&s->lock);
__invalidate_snapshot(s, -EIO);
error = 1;
goto out;
}
- down_write(&s->lock);
- if (!s->valid) {
- error = 1;
- goto out;
- }
-
/*
* Check for conflicting reads. This is extremely improbable,
* so msleep(1) is sufficient and there is no need for a wait queue.
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic