loop.c (9134d02bc0af4a8747d448d1f811ec5f8eb96df6) | loop.c (1f98a13f623e0ef666690a18c1250335fc6d7ef1) |
---|---|
1/* 2 * linux/drivers/block/loop.c 3 * 4 * Written by Theodore Ts'o, 3/29/93 5 * 6 * Copyright 1993 by Theodore Ts'o. Redistribution of this file is 7 * permitted under the GNU General Public License. 8 * --- 461 unchanged lines hidden (view full) --- 470static int do_bio_filebacked(struct loop_device *lo, struct bio *bio) 471{ 472 loff_t pos; 473 int ret; 474 475 pos = ((loff_t) bio->bi_sector << 9) + lo->lo_offset; 476 477 if (bio_rw(bio) == WRITE) { | 1/* 2 * linux/drivers/block/loop.c 3 * 4 * Written by Theodore Ts'o, 3/29/93 5 * 6 * Copyright 1993 by Theodore Ts'o. Redistribution of this file is 7 * permitted under the GNU General Public License. 8 * --- 461 unchanged lines hidden (view full) --- 470static int do_bio_filebacked(struct loop_device *lo, struct bio *bio) 471{ 472 loff_t pos; 473 int ret; 474 475 pos = ((loff_t) bio->bi_sector << 9) + lo->lo_offset; 476 477 if (bio_rw(bio) == WRITE) { |
478 int barrier = bio_barrier(bio); | 478 bool barrier = bio_rw_flagged(bio, BIO_RW_BARRIER); |
479 struct file *file = lo->lo_backing_file; 480 481 if (barrier) { 482 if (unlikely(!file->f_op->fsync)) { 483 ret = -EOPNOTSUPP; 484 goto out; 485 } 486 --- 1187 unchanged lines hidden --- | 479 struct file *file = lo->lo_backing_file; 480 481 if (barrier) { 482 if (unlikely(!file->f_op->fsync)) { 483 ret = -EOPNOTSUPP; 484 goto out; 485 } 486 --- 1187 unchanged lines hidden --- |