diff options
Diffstat (limited to 'fs/nfs/internal.h')
| -rw-r--r-- | fs/nfs/internal.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index 18d46b0e71dd..1d5d62f88dde 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h @@ -847,17 +847,19 @@ void nfs_super_set_maxbytes(struct super_block *sb, __u64 maxfilesize) } /* - * Record the page as unstable (an extra writeback period) and mark its - * inode as dirty. + * Record the request's range as unstable (an extra writeback period) and + * mark its inode as dirty. */ -static inline void nfs_folio_mark_unstable(struct folio *folio, +static inline void nfs_folio_mark_unstable(struct nfs_page *req, struct nfs_commit_info *cinfo) { + struct folio *folio = nfs_page_to_folio(req); + if (folio && !cinfo->dreq) { struct inode *inode = folio->mapping->host; - long nr = folio_nr_pages(folio); + long nr = DIV_ROUND_UP(req->wb_bytes, PAGE_SIZE); - /* This page is really still in write-back - just that the + /* This range is really still in write-back - just that the * writeback is happening on the server now. */ node_stat_mod_folio(folio, NR_WRITEBACK, nr); |
