cifs: don't instantiate new dentries in readdir for inodes that need to be revalidate...
[linux-3.10.git] / fs / buffer.c
index 71578d6..d2a4d1b 100644 (file)
@@ -865,8 +865,6 @@ try_again:
 
                /* Link the buffer to its page */
                set_bh_page(bh, page, offset);
-
-               init_buffer(bh, NULL, NULL);
        }
        return head;
 /*
@@ -2979,7 +2977,6 @@ int _submit_bh(int rw, struct buffer_head *bh, unsigned long bio_flags)
        bio->bi_io_vec[0].bv_offset = bh_offset(bh);
 
        bio->bi_vcnt = 1;
-       bio->bi_idx = 0;
        bio->bi_size = bh->b_size;
 
        bio->bi_end_io = end_bio_bh_io_sync;
@@ -2989,6 +2986,11 @@ int _submit_bh(int rw, struct buffer_head *bh, unsigned long bio_flags)
        /* Take care of bh's that straddle the end of the device */
        guard_bh_eod(rw, bio, bh);
 
+       if (buffer_meta(bh))
+               rw |= REQ_META;
+       if (buffer_prio(bh))
+               rw |= REQ_PRIO;
+
        bio_get(bio);
        submit_bio(rw, bio);