Remove redundant spin lock in dec_pending() --- diff/drivers/md/dm.c 2004-02-09 10:42:37.000000000 +0000 +++ source/drivers/md/dm.c 2004-02-09 10:43:02.000000000 +0000 @@ -257,14 +257,8 @@ */ 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))