Message ID | 20231109210608.2252323-5-willy@infradead.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | More buffer_head cleanups | expand |
diff --git a/fs/buffer.c b/fs/buffer.c index 9c3f49cf8d28..ab345fd4da12 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -2008,7 +2008,7 @@ static int iomap_to_bh(struct inode *inode, sector_t block, struct buffer_head *bh, const struct iomap *iomap) { - loff_t offset = block << inode->i_blkbits; + loff_t offset = (loff_t)block << inode->i_blkbits; bh->b_bdev = iomap->bdev;
While sector_t is always defined as a u64 today, that hasn't always been the case and it might not always be the same size as loff_t in the future. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> --- fs/buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)