* [PATCH 0/2] Fixups for pending branches after PAGE_CACHE_/page_cache_ removal
@ 2016-04-26 10:43 David Sterba
2016-04-26 10:43 ` [PATCH 1/2] btrfs: btrfs_read_disk_super: PAGE_CACHE_ removal related fixups David Sterba
2016-04-26 10:44 ` [PATCH 2/2] btrfs: __btrfs_buffered_write: " David Sterba
0 siblings, 2 replies; 3+ messages in thread
From: David Sterba @ 2016-04-26 10:43 UTC (permalink / raw)
To: linux-btrfs; +Cc: David Sterba
Hi,
merge tests of current for-next to master lead to build failures, because some
of the branches still used the PAGE_CACHE_ macros. As I don't want to do
rebases, there are fixups committed on top of the respective branches.
These are:
* device delete by id, from Anand Jain
* enospc rework, from Josef Bacik
David Sterba (2):
btrfs: btrfs_read_disk_super: PAGE_CACHE_ removal related fixups
btrfs: __btrfs_buffered_write: PAGE_CACHE_ removal related fixups
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] btrfs: btrfs_read_disk_super: PAGE_CACHE_ removal related fixups
2016-04-26 10:43 [PATCH 0/2] Fixups for pending branches after PAGE_CACHE_/page_cache_ removal David Sterba
@ 2016-04-26 10:43 ` David Sterba
2016-04-26 10:44 ` [PATCH 2/2] btrfs: __btrfs_buffered_write: " David Sterba
1 sibling, 0 replies; 3+ messages in thread
From: David Sterba @ 2016-04-26 10:43 UTC (permalink / raw)
To: linux-btrfs; +Cc: David Sterba
The PAGE_CACHE_* macros and page_cache_* helpers are gone in the next
merging target (4.7), so we have to fix that before the "delete device
by id" branch gets merged. Fixed only instances introduced by this
patchset.
Signed-off-by: David Sterba <dsterba@suse.com>
---
fs/btrfs/volumes.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index ceacd9dca9c0..0da9522a3dd8 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -1006,7 +1006,7 @@ int btrfs_open_devices(struct btrfs_fs_devices *fs_devices,
void btrfs_release_disk_super(struct page *page)
{
kunmap(page);
- page_cache_release(page);
+ put_page(page);
}
int btrfs_read_disk_super(struct block_device *bdev, u64 bytenr,
@@ -1016,16 +1016,16 @@ int btrfs_read_disk_super(struct block_device *bdev, u64 bytenr,
pgoff_t index;
/* make sure our super fits in the device */
- if (bytenr + PAGE_CACHE_SIZE >= i_size_read(bdev->bd_inode))
+ if (bytenr + PAGE_SIZE >= i_size_read(bdev->bd_inode))
return 1;
/* make sure our super fits in the page */
- if (sizeof(**disk_super) > PAGE_CACHE_SIZE)
+ if (sizeof(**disk_super) > PAGE_SIZE)
return 1;
/* make sure our super doesn't straddle pages on disk */
- index = bytenr >> PAGE_CACHE_SHIFT;
- if ((bytenr + sizeof(**disk_super) - 1) >> PAGE_CACHE_SHIFT != index)
+ index = bytenr >> PAGE_SHIFT;
+ if ((bytenr + sizeof(**disk_super) - 1) >> PAGE_SHIFT != index)
return 1;
/* pull in the page with our super */
@@ -1038,7 +1038,7 @@ int btrfs_read_disk_super(struct block_device *bdev, u64 bytenr,
p = kmap(*page);
/* align our pointer to the offset of the super block */
- *disk_super = p + (bytenr & ~PAGE_CACHE_MASK);
+ *disk_super = p + (bytenr & ~PAGE_MASK);
if (btrfs_super_bytenr(*disk_super) != bytenr ||
btrfs_super_magic(*disk_super) != BTRFS_MAGIC) {
--
2.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] btrfs: __btrfs_buffered_write: PAGE_CACHE_ removal related fixups
2016-04-26 10:43 [PATCH 0/2] Fixups for pending branches after PAGE_CACHE_/page_cache_ removal David Sterba
2016-04-26 10:43 ` [PATCH 1/2] btrfs: btrfs_read_disk_super: PAGE_CACHE_ removal related fixups David Sterba
@ 2016-04-26 10:44 ` David Sterba
1 sibling, 0 replies; 3+ messages in thread
From: David Sterba @ 2016-04-26 10:44 UTC (permalink / raw)
To: linux-btrfs; +Cc: David Sterba
The PAGE_CACHE_* macros and page_cache_* helpers are gone in the next
merging target (4.7), so we have to fix that before the "enospc rework"
branch gets merged. Fixed only instances introduced by this patchset.
Signed-off-by: David Sterba <dsterba@suse.com>
---
fs/btrfs/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 7c802082a76b..2ef3b94a1a44 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -1549,7 +1549,7 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file,
* write_bytes, so scale down.
*/
num_pages = DIV_ROUND_UP(write_bytes + offset,
- PAGE_CACHE_SIZE);
+ PAGE_SIZE);
reserve_bytes = round_up(write_bytes +
sector_offset,
root->sectorsize);
--
2.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-26 10:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-26 10:43 [PATCH 0/2] Fixups for pending branches after PAGE_CACHE_/page_cache_ removal David Sterba
2016-04-26 10:43 ` [PATCH 1/2] btrfs: btrfs_read_disk_super: PAGE_CACHE_ removal related fixups David Sterba
2016-04-26 10:44 ` [PATCH 2/2] btrfs: __btrfs_buffered_write: " David Sterba
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.