mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
Merge branch 'master' into for-next
This commit is contained in:
commit
d4263348f7
10316 changed files with 557400 additions and 217358 deletions
20
fs/buffer.c
20
fs/buffer.c
|
|
@ -654,14 +654,16 @@ EXPORT_SYMBOL(mark_buffer_dirty_inode);
|
|||
static void __set_page_dirty(struct page *page,
|
||||
struct address_space *mapping, int warn)
|
||||
{
|
||||
spin_lock_irq(&mapping->tree_lock);
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&mapping->tree_lock, flags);
|
||||
if (page->mapping) { /* Race with truncate? */
|
||||
WARN_ON_ONCE(warn && !PageUptodate(page));
|
||||
account_page_dirtied(page, mapping);
|
||||
radix_tree_tag_set(&mapping->page_tree,
|
||||
page_index(page), PAGECACHE_TAG_DIRTY);
|
||||
}
|
||||
spin_unlock_irq(&mapping->tree_lock);
|
||||
spin_unlock_irqrestore(&mapping->tree_lock, flags);
|
||||
__mark_inode_dirty(mapping->host, I_DIRTY_PAGES);
|
||||
}
|
||||
|
||||
|
|
@ -1312,7 +1314,7 @@ static void bh_lru_install(struct buffer_head *bh)
|
|||
}
|
||||
while (out < BH_LRU_SIZE)
|
||||
bhs[out++] = NULL;
|
||||
memcpy(__this_cpu_ptr(&bh_lrus.bhs), bhs, sizeof(bhs));
|
||||
memcpy(this_cpu_ptr(&bh_lrus.bhs), bhs, sizeof(bhs));
|
||||
}
|
||||
bh_lru_unlock();
|
||||
|
||||
|
|
@ -2982,11 +2984,11 @@ static void guard_bh_eod(int rw, struct bio *bio, struct buffer_head *bh)
|
|||
* let it through, and the IO layer will turn it into
|
||||
* an EIO.
|
||||
*/
|
||||
if (unlikely(bio->bi_sector >= maxsector))
|
||||
if (unlikely(bio->bi_iter.bi_sector >= maxsector))
|
||||
return;
|
||||
|
||||
maxsector -= bio->bi_sector;
|
||||
bytes = bio->bi_size;
|
||||
maxsector -= bio->bi_iter.bi_sector;
|
||||
bytes = bio->bi_iter.bi_size;
|
||||
if (likely((bytes >> 9) <= maxsector))
|
||||
return;
|
||||
|
||||
|
|
@ -2994,7 +2996,7 @@ static void guard_bh_eod(int rw, struct bio *bio, struct buffer_head *bh)
|
|||
bytes = maxsector << 9;
|
||||
|
||||
/* Truncate the bio.. */
|
||||
bio->bi_size = bytes;
|
||||
bio->bi_iter.bi_size = bytes;
|
||||
bio->bi_io_vec[0].bv_len = bytes;
|
||||
|
||||
/* ..and clear the end of the buffer for reads */
|
||||
|
|
@ -3029,14 +3031,14 @@ int _submit_bh(int rw, struct buffer_head *bh, unsigned long bio_flags)
|
|||
*/
|
||||
bio = bio_alloc(GFP_NOIO, 1);
|
||||
|
||||
bio->bi_sector = bh->b_blocknr * (bh->b_size >> 9);
|
||||
bio->bi_iter.bi_sector = bh->b_blocknr * (bh->b_size >> 9);
|
||||
bio->bi_bdev = bh->b_bdev;
|
||||
bio->bi_io_vec[0].bv_page = bh->b_page;
|
||||
bio->bi_io_vec[0].bv_len = bh->b_size;
|
||||
bio->bi_io_vec[0].bv_offset = bh_offset(bh);
|
||||
|
||||
bio->bi_vcnt = 1;
|
||||
bio->bi_size = bh->b_size;
|
||||
bio->bi_iter.bi_size = bh->b_size;
|
||||
|
||||
bio->bi_end_io = end_bio_bh_io_sync;
|
||||
bio->bi_private = bh;
|
||||
|
|
|
|||
Loading…
Reference in a new issue