
From: Joe Thornber <thornber@redhat.com>

Remove redundant spin lock in dec_pending()


---

 25-akpm/drivers/md/dm.c |    8 +-------
 1 files changed, 1 insertion(+), 7 deletions(-)

diff -puN drivers/md/dm.c~dm-09-dec_pending-locking-cleanup drivers/md/dm.c
--- 25/drivers/md/dm.c~dm-09-dec_pending-locking-cleanup	Tue Feb 10 13:08:33 2004
+++ 25-akpm/drivers/md/dm.c	Tue Feb 10 13:08:33 2004
@@ -217,14 +217,8 @@ static int queue_io(struct mapped_device
  */
 static inline void dec_pending(struct dm_io *io, int error)
 {
-	static spinlock_t _uptodate_lock = SPIN_LOCK_UNLOCKED;
-	unsigned long flags;
-
-	if (error) {
-		spin_lock_irqsave(&_uptodate_lock, flags);
+	if (error)
 		io->error = error;
-		spin_unlock_irqrestore(&_uptodate_lock, flags);
-	}
 
 	if (atomic_dec_and_test(&io->io_count)) {
 		if (atomic_dec_and_test(&io->md->pending))

_
