summaryrefslogtreecommitdiffstats
path: root/fs/fscache
diff options
context:
space:
mode:
authorJiri Kosina2017-11-15 11:04:13 +0100
committerJiri Kosina2017-11-15 11:04:13 +0100
commit5cc619db5c34146ee821acd08382b9d78579b52e (patch)
treeee28e3cefdb35d56e33887f05db0a50589aa5883 /fs/fscache
parentMerge branch 'for-4.14/upstream-fixes' into for-linus (diff)
parentHID: alps: add new U1 device ID (diff)
downloadkernel-qcow2-linux-5cc619db5c34146ee821acd08382b9d78579b52e.tar.gz
kernel-qcow2-linux-5cc619db5c34146ee821acd08382b9d78579b52e.tar.xz
kernel-qcow2-linux-5cc619db5c34146ee821acd08382b9d78579b52e.zip
Merge branch 'for-4.15/alps' into for-linus
- New ALPS touchpad (T4, found currently on HP EliteBook 1000, Zbook Stduio and HP Elite book x360) support from Masaki Ota
Diffstat (limited to 'fs/fscache')
-rw-r--r--fs/fscache/object-list.c3
-rw-r--r--fs/fscache/page.c5
2 files changed, 4 insertions, 4 deletions
diff --git a/fs/fscache/object-list.c b/fs/fscache/object-list.c
index 67f940892ef8..b5ab06fabc60 100644
--- a/fs/fscache/object-list.c
+++ b/fs/fscache/object-list.c
@@ -262,7 +262,8 @@ static int fscache_objlist_show(struct seq_file *m, void *v)
type = "DT";
break;
default:
- sprintf(_type, "%02u", cookie->def->type);
+ snprintf(_type, sizeof(_type), "%02u",
+ cookie->def->type);
type = _type;
break;
}
diff --git a/fs/fscache/page.c b/fs/fscache/page.c
index c8c4f79c7ce1..0ad3fd3ad0b4 100644
--- a/fs/fscache/page.c
+++ b/fs/fscache/page.c
@@ -1178,11 +1178,10 @@ void __fscache_uncache_all_inode_pages(struct fscache_cookie *cookie,
pagevec_init(&pvec, 0);
next = 0;
do {
- if (!pagevec_lookup(&pvec, mapping, next, PAGEVEC_SIZE))
+ if (!pagevec_lookup(&pvec, mapping, &next))
break;
for (i = 0; i < pagevec_count(&pvec); i++) {
struct page *page = pvec.pages[i];
- next = page->index;
if (PageFsCache(page)) {
__fscache_wait_on_page_write(cookie, page);
__fscache_uncache_page(cookie, page);
@@ -1190,7 +1189,7 @@ void __fscache_uncache_all_inode_pages(struct fscache_cookie *cookie,
}
pagevec_release(&pvec);
cond_resched();
- } while (++next);
+ } while (next);
_leave("");
}