From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Wilcox (Oracle) Date: Wed, 17 May 2023 04:24:41 +0100 Subject: [Cluster-devel] [PATCH 5/6] gfs2: Support ludicrously large folios in gfs2_trans_add_databufs() In-Reply-To: <20230517032442.1135379-1-willy@infradead.org> References: <20230517032442.1135379-1-willy@infradead.org> Message-ID: <20230517032442.1135379-6-willy@infradead.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit We may someday support folios larger than 4GB, so use a size_t for the byte count within a folio to prevent unpleasant truncations. Signed-off-by: Matthew Wilcox (Oracle) --- fs/gfs2/aops.c | 2 +- fs/gfs2/aops.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c index e97462a5302e..8da4397aafc6 100644 --- a/fs/gfs2/aops.c +++ b/fs/gfs2/aops.c @@ -38,7 +38,7 @@ void gfs2_trans_add_databufs(struct gfs2_inode *ip, struct folio *folio, - unsigned int from, unsigned int len) + size_t from, size_t len) { struct buffer_head *head = folio_buffers(folio); unsigned int bsize = head->b_size; diff --git a/fs/gfs2/aops.h b/fs/gfs2/aops.h index 09db1914425e..f08322ef41cf 100644 --- a/fs/gfs2/aops.h +++ b/fs/gfs2/aops.h @@ -10,6 +10,6 @@ extern void adjust_fs_space(struct inode *inode); extern void gfs2_trans_add_databufs(struct gfs2_inode *ip, struct folio *folio, - unsigned int from, unsigned int len); + size_t from, size_t len); #endif /* __AOPS_DOT_H__ */ -- 2.39.2