]> git.hungrycats.org Git - linux/commitdiff
[PATCH] dm: Remove redundant spin lock in dec_pending()
authorAndrew Morton <akpm@osdl.org>
Wed, 18 Feb 2004 12:53:10 +0000 (04:53 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 18 Feb 2004 12:53:10 +0000 (04:53 -0800)
From: Joe Thornber <thornber@redhat.com>

Remove redundant spin lock in dec_pending()

drivers/md/dm.c

index c922fd5c835f297b40cd4b2412fe05430c9bb4af..dc7be49e6e2a6ccfd3a773b1e2704f9351fa0a76 100644 (file)
@@ -217,14 +217,8 @@ static int queue_io(struct mapped_device *md, struct bio *bio)
  */
 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))