rk: revert to v3.10
[firefly-linux-kernel-4.4.55.git] / fs / buffer.c
index 83fedaa53b55c0118f3858d4296de3f3acb7e293..d2a4d1bb2d57aec3999e494d52c4f765a0ae48e8 100644 (file)
@@ -620,16 +620,14 @@ EXPORT_SYMBOL(mark_buffer_dirty_inode);
 static void __set_page_dirty(struct page *page,
                struct address_space *mapping, int warn)
 {
-       unsigned long flags;
-
-       spin_lock_irqsave(&mapping->tree_lock, flags);
+       spin_lock_irq(&mapping->tree_lock);
        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_irqrestore(&mapping->tree_lock, flags);
+       spin_unlock_irq(&mapping->tree_lock);
        __mark_inode_dirty(mapping->host, I_DIRTY_PAGES);
 }
 
@@ -985,8 +983,7 @@ grow_dev_page(struct block_device *bdev, sector_t block,
                bh = page_buffers(page);
                if (bh->b_size == size) {
                        end_block = init_page_buffers(page, bdev,
-                                               (sector_t)index << sizebits,
-                                               size);
+                                               index << sizebits, size);
                        goto done;
                }
                if (!try_to_free_buffers(page))
@@ -1007,8 +1004,7 @@ grow_dev_page(struct block_device *bdev, sector_t block,
         */
        spin_lock(&inode->i_mapping->private_lock);
        link_dev_buffers(page, bh);
-       end_block = init_page_buffers(page, bdev, (sector_t)index << sizebits,
-                       size);
+       end_block = init_page_buffers(page, bdev, index << sizebits, size);
        spin_unlock(&inode->i_mapping->private_lock);
 done:
        ret = (block < end_block) ? 1 : -ENXIO;
@@ -2018,7 +2014,6 @@ int generic_write_end(struct file *file, struct address_space *mapping,
                        struct page *page, void *fsdata)
 {
        struct inode *inode = mapping->host;
-       loff_t old_size = inode->i_size;
        int i_size_changed = 0;
 
        copied = block_write_end(file, mapping, pos, len, copied, page, fsdata);
@@ -2038,8 +2033,6 @@ int generic_write_end(struct file *file, struct address_space *mapping,
        unlock_page(page);
        page_cache_release(page);
 
-       if (old_size < pos)
-               pagecache_isize_extended(inode, old_size, pos);
        /*
         * Don't mark the inode dirty under page lock. First, it unnecessarily
         * makes the holding time of page lock longer. Second, it forces lock
@@ -2257,11 +2250,6 @@ static int cont_expand_zero(struct file *file, struct address_space *mapping,
                err = 0;
 
                balance_dirty_pages_ratelimited(mapping);
-
-               if (unlikely(fatal_signal_pending(current))) {
-                       err = -EINTR;
-                       goto out;
-               }
        }
 
        /* page covers the boundary, find the boundary offset */