projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'v3.9-samsung-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel...
[firefly-linux-kernel-4.4.55.git]
/
fs
/
buffer.c
diff --git
a/fs/buffer.c
b/fs/buffer.c
index 7a75c3e0fd5896b7fc59595fff859c41f23f65b1..b4dcb34c9635ae61b747bb9d4816477a49a8d90a 100644
(file)
--- a/
fs/buffer.c
+++ b/
fs/buffer.c
@@
-41,6
+41,7
@@
#include <linux/bitops.h>
#include <linux/mpage.h>
#include <linux/bit_spinlock.h>
#include <linux/bitops.h>
#include <linux/mpage.h>
#include <linux/bit_spinlock.h>
+#include <trace/events/block.h>
static int fsync_buffers_list(spinlock_t *lock, struct list_head *list);
static int fsync_buffers_list(spinlock_t *lock, struct list_head *list);
@@
-53,6
+54,13
@@
void init_buffer(struct buffer_head *bh, bh_end_io_t *handler, void *private)
}
EXPORT_SYMBOL(init_buffer);
}
EXPORT_SYMBOL(init_buffer);
+inline void touch_buffer(struct buffer_head *bh)
+{
+ trace_block_touch_buffer(bh);
+ mark_page_accessed(bh->b_page);
+}
+EXPORT_SYMBOL(touch_buffer);
+
static int sleep_on_buffer(void *word)
{
io_schedule();
static int sleep_on_buffer(void *word)
{
io_schedule();
@@
-1113,6
+1121,8
@@
void mark_buffer_dirty(struct buffer_head *bh)
{
WARN_ON_ONCE(!buffer_uptodate(bh));
{
WARN_ON_ONCE(!buffer_uptodate(bh));
+ trace_block_dirty_buffer(bh);
+
/*
* Very *carefully* optimize the it-is-already-dirty case.
*
/*
* Very *carefully* optimize the it-is-already-dirty case.
*
@@
-2332,7
+2342,7
@@
int __block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
get_block_t get_block)
{
struct page *page = vmf->page;
get_block_t get_block)
{
struct page *page = vmf->page;
- struct inode *inode =
vma->vm_file->f_path.dentry->d_inode
;
+ struct inode *inode =
file_inode(vma->vm_file)
;
unsigned long end;
loff_t size;
int ret;
unsigned long end;
loff_t size;
int ret;
@@
-2359,7
+2369,7
@@
int __block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
if (unlikely(ret < 0))
goto out_unlock;
set_page_dirty(page);
if (unlikely(ret < 0))
goto out_unlock;
set_page_dirty(page);
- wait_
on_page_writeback
(page);
+ wait_
for_stable_page
(page);
return 0;
out_unlock:
unlock_page(page);
return 0;
out_unlock:
unlock_page(page);
@@
-2371,7
+2381,7
@@
int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
get_block_t get_block)
{
int ret;
get_block_t get_block)
{
int ret;
- struct super_block *sb =
vma->vm_file->f_path.dentry->d_inode
->i_sb;
+ struct super_block *sb =
file_inode(vma->vm_file)
->i_sb;
sb_start_pagefault(sb);
sb_start_pagefault(sb);
@@
-3227,7
+3237,7
@@
static struct kmem_cache *bh_cachep __read_mostly;
* Once the number of bh's in the machine exceeds this level, we start
* stripping them in writeback.
*/
* Once the number of bh's in the machine exceeds this level, we start
* stripping them in writeback.
*/
-static
int
max_buffer_heads;
+static
unsigned long
max_buffer_heads;
int buffer_heads_over_limit;
int buffer_heads_over_limit;
@@
-3343,7
+3353,7
@@
EXPORT_SYMBOL(bh_submit_read);
void __init buffer_init(void)
{
void __init buffer_init(void)
{
-
int
nrpages;
+
unsigned long
nrpages;
bh_cachep = kmem_cache_create("buffer_head",
sizeof(struct buffer_head), 0,
bh_cachep = kmem_cache_create("buffer_head",
sizeof(struct buffer_head), 0,