diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-10-07 20:20:08 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-10-07 20:20:08 +0200 |
commit | 7041503d3a5c869e4b4934df57112ef90ce7e307 (patch) | |
tree | 00d535406cb61c351dc1ec6e9e94ce1fecf915bd /fs/afs | |
parent | Merge tag 'perf-tools-fixes-for-v5.15-2021-10-07' of git://git.kernel.org/pub... (diff) | |
parent | afs: Fix afs_launder_page() to set correct start file position (diff) | |
download | linux-7041503d3a5c869e4b4934df57112ef90ce7e307.tar.xz linux-7041503d3a5c869e4b4934df57112ef90ce7e307.zip |
Merge tag 'misc-fixes-20211007' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs
Pull netfslib, cachefiles and afs fixes from David Howells:
- Fix another couple of oopses in cachefiles tracing stemming from the
possibility of passing in a NULL object pointer
- Fix netfs_clear_unread() to set READ on the iov_iter so that source
it is passed to doesn't do the wrong thing (some drivers look at the
flag on iov_iter rather than other available information to determine
the direction)
- Fix afs_launder_page() to write back at the correct file position on
the server so as not to corrupt data
* tag 'misc-fixes-20211007' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
afs: Fix afs_launder_page() to set correct start file position
netfs: Fix READ/WRITE confusion when calling iov_iter_xarray()
cachefiles: Fix oops with cachefiles_cull() due to NULL object
Diffstat (limited to 'fs/afs')
-rw-r--r-- | fs/afs/write.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/afs/write.c b/fs/afs/write.c index 2dfe3b3a53d6..f24370f5c774 100644 --- a/fs/afs/write.c +++ b/fs/afs/write.c @@ -974,8 +974,7 @@ int afs_launder_page(struct page *page) iov_iter_bvec(&iter, WRITE, bv, 1, bv[0].bv_len); trace_afs_page_dirty(vnode, tracepoint_string("launder"), page); - ret = afs_store_data(vnode, &iter, (loff_t)page->index * PAGE_SIZE, - true); + ret = afs_store_data(vnode, &iter, page_offset(page) + f, true); } trace_afs_page_dirty(vnode, tracepoint_string("laundered"), page); |