Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab...
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 14 Sep 2007 20:59:05 +0000 (13:59 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 14 Sep 2007 20:59:05 +0000 (13:59 -0700)
* 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
  V4L/DVB (6220a): fix build error for et61x251 driver
  V4L/DVB (6188): Avoid a NULL pointer dereference during mpeg_open()
  V4L/DVB (6173a): Documentation: Remove reference to dead "cpia_pp=" boot-time option
  V4L/DVB (6148): Fix a warning at saa7191_probe
  V4L/DVB (6147): Pwc: Fix a broken debug message
  V4L/DVB (6144): Fix mux setup for composite sound on AverTV 307
  V4L/DVB (6095): ivtv: fix VIDIOC_G_ENC_INDEX flag handling

block/ll_rw_blk.c
drivers/md/dm-bio-list.h
net/sunrpc/svcsock.c

index cd20367..ed39313 100644 (file)
@@ -1085,6 +1085,12 @@ void blk_queue_end_tag(struct request_queue *q, struct request *rq)
 
        bqt->tag_index[tag] = NULL;
 
+       /*
+        * We use test_and_clear_bit's memory ordering properties here.
+        * The tag_map bit acts as a lock for tag_index[bit], so we need
+        * a barrer before clearing the bit (precisely: release semantics).
+        * Could use clear_bit_unlock when it is merged.
+        */
        if (unlikely(!test_and_clear_bit(tag, bqt->tag_map))) {
                printk(KERN_ERR "%s: attempt to clear non-busy tag (%d)\n",
                       __FUNCTION__, tag);
@@ -1137,6 +1143,10 @@ int blk_queue_start_tag(struct request_queue *q, struct request *rq)
                        return 1;
 
        } while (test_and_set_bit(tag, bqt->tag_map));
+       /*
+        * We rely on test_and_set_bit providing lock memory ordering semantics
+        * (could use test_and_set_bit_lock when it is merged).
+        */
 
        rq->cmd_flags |= REQ_QUEUED;
        rq->tag = tag;
index 16ee3b0..3f7b827 100644 (file)
@@ -9,6 +9,8 @@
 
 #include <linux/bio.h>
 
+#ifdef CONFIG_BLOCK
+
 struct bio_list {
        struct bio *head;
        struct bio *tail;
@@ -106,4 +108,5 @@ static inline struct bio *bio_list_get(struct bio_list *bl)
        return bio;
 }
 
+#endif /* CONFIG_BLOCK */
 #endif
index 12ff5da..1a89992 100644 (file)
@@ -1592,7 +1592,7 @@ svc_age_temp_sockets(unsigned long closure)
 
                if (!test_and_set_bit(SK_OLD, &svsk->sk_flags))
                        continue;
-               if (atomic_read(&svsk->sk_inuse) || test_bit(SK_BUSY, &svsk->sk_flags))
+               if (atomic_read(&svsk->sk_inuse) > 1 || test_bit(SK_BUSY, &svsk->sk_flags))
                        continue;
                atomic_inc(&svsk->sk_inuse);
                list_move(le, &to_be_aged);