Skip to content

Commit acc6100

Browse files
zhangyi089tytso
authored andcommitted
fs: remove bdev_try_to_free_page callback
After remove the unique user of sop->bdev_try_to_free_page() callback, we could remove the callback and the corresponding blkdev_releasepage() at all. Signed-off-by: Zhang Yi <[email protected]> Reviewed-by: Jan Kara <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
1 parent 3b672e3 commit acc6100

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

fs/block_dev.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1733,20 +1733,6 @@ ssize_t blkdev_read_iter(struct kiocb *iocb, struct iov_iter *to)
17331733
}
17341734
EXPORT_SYMBOL_GPL(blkdev_read_iter);
17351735

1736-
/*
1737-
* Try to release a page associated with block device when the system
1738-
* is under memory pressure.
1739-
*/
1740-
static int blkdev_releasepage(struct page *page, gfp_t wait)
1741-
{
1742-
struct super_block *super = BDEV_I(page->mapping->host)->bdev.bd_super;
1743-
1744-
if (super && super->s_op->bdev_try_to_free_page)
1745-
return super->s_op->bdev_try_to_free_page(super, page, wait);
1746-
1747-
return try_to_free_buffers(page);
1748-
}
1749-
17501736
static int blkdev_writepages(struct address_space *mapping,
17511737
struct writeback_control *wbc)
17521738
{
@@ -1760,7 +1746,6 @@ static const struct address_space_operations def_blk_aops = {
17601746
.write_begin = blkdev_write_begin,
17611747
.write_end = blkdev_write_end,
17621748
.writepages = blkdev_writepages,
1763-
.releasepage = blkdev_releasepage,
17641749
.direct_IO = blkdev_direct_IO,
17651750
.migratepage = buffer_migrate_page_norefs,
17661751
.is_dirty_writeback = buffer_check_dirty_writeback,

include/linux/fs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2171,7 +2171,6 @@ struct super_operations {
21712171
ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);
21722172
struct dquot **(*get_dquots)(struct inode *);
21732173
#endif
2174-
int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t);
21752174
long (*nr_cached_objects)(struct super_block *,
21762175
struct shrink_control *);
21772176
long (*free_cached_objects)(struct super_block *,

0 commit comments

Comments
 (0)