Message ID | 20210719103520.495450-5-hch@lst.de (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [01/27] iomap: fix a trivial comment typo in trace.h | expand |
On Mon, Jul 19, 2021 at 12:34:57PM +0200, Christoph Hellwig wrote: > __block_write_begin_int never modifies the passed in iomap, so mark it > const. > > Signed-off-by: Christoph Hellwig <hch@lst.de> Looks ok, Reviewed-by: Darrick J. Wong <djwong@kernel.org> --D > --- > fs/buffer.c | 4 ++-- > fs/internal.h | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/fs/buffer.c b/fs/buffer.c > index 6290c3afdba488..bd6a9e9fbd64c9 100644 > --- a/fs/buffer.c > +++ b/fs/buffer.c > @@ -1912,7 +1912,7 @@ EXPORT_SYMBOL(page_zero_new_buffers); > > static void > iomap_to_bh(struct inode *inode, sector_t block, struct buffer_head *bh, > - struct iomap *iomap) > + const struct iomap *iomap) > { > loff_t offset = block << inode->i_blkbits; > > @@ -1966,7 +1966,7 @@ iomap_to_bh(struct inode *inode, sector_t block, struct buffer_head *bh, > } > > int __block_write_begin_int(struct page *page, loff_t pos, unsigned len, > - get_block_t *get_block, struct iomap *iomap) > + get_block_t *get_block, const struct iomap *iomap) > { > unsigned from = pos & (PAGE_SIZE - 1); > unsigned to = from + len; > diff --git a/fs/internal.h b/fs/internal.h > index 3ce8edbaa3ca2f..9ad6b5157584b8 100644 > --- a/fs/internal.h > +++ b/fs/internal.h > @@ -48,8 +48,8 @@ static inline int emergency_thaw_bdev(struct super_block *sb) > /* > * buffer.c > */ > -extern int __block_write_begin_int(struct page *page, loff_t pos, unsigned len, > - get_block_t *get_block, struct iomap *iomap); > +int __block_write_begin_int(struct page *page, loff_t pos, unsigned len, > + get_block_t *get_block, const struct iomap *iomap); > > /* > * char_dev.c > -- > 2.30.2 >
diff --git a/fs/buffer.c b/fs/buffer.c index 6290c3afdba488..bd6a9e9fbd64c9 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -1912,7 +1912,7 @@ EXPORT_SYMBOL(page_zero_new_buffers); static void iomap_to_bh(struct inode *inode, sector_t block, struct buffer_head *bh, - struct iomap *iomap) + const struct iomap *iomap) { loff_t offset = block << inode->i_blkbits; @@ -1966,7 +1966,7 @@ iomap_to_bh(struct inode *inode, sector_t block, struct buffer_head *bh, } int __block_write_begin_int(struct page *page, loff_t pos, unsigned len, - get_block_t *get_block, struct iomap *iomap) + get_block_t *get_block, const struct iomap *iomap) { unsigned from = pos & (PAGE_SIZE - 1); unsigned to = from + len; diff --git a/fs/internal.h b/fs/internal.h index 3ce8edbaa3ca2f..9ad6b5157584b8 100644 --- a/fs/internal.h +++ b/fs/internal.h @@ -48,8 +48,8 @@ static inline int emergency_thaw_bdev(struct super_block *sb) /* * buffer.c */ -extern int __block_write_begin_int(struct page *page, loff_t pos, unsigned len, - get_block_t *get_block, struct iomap *iomap); +int __block_write_begin_int(struct page *page, loff_t pos, unsigned len, + get_block_t *get_block, const struct iomap *iomap); /* * char_dev.c
__block_write_begin_int never modifies the passed in iomap, so mark it const. Signed-off-by: Christoph Hellwig <hch@lst.de> --- fs/buffer.c | 4 ++-- fs/internal.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)