lkml.org 
[lkml]   [2022]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] brtfs: use PAGE_ALIGNED macro
Date
From: Yushan Zhou <katrinzhou@tencent.com>

The header file linux/mm.h provides the PAGE_ALIGNED macro to
test whether an address is aligned to PAGE_SIZE. Use it instead
of IS_ALIGNED.

Signed-off-by: Yushan Zhou <katrinzhou@tencent.com>
---
fs/btrfs/lzo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/lzo.c b/fs/btrfs/lzo.c
index d5e78cbc8fbc..71f6d8302d50 100644
--- a/fs/btrfs/lzo.c
+++ b/fs/btrfs/lzo.c
@@ -280,7 +280,7 @@ int lzo_compress_pages(struct list_head *ws, struct address_space *mapping,
}

/* Check if we have reached page boundary */
- if (IS_ALIGNED(cur_in, PAGE_SIZE)) {
+ if (PAGE_ALIGNED(cur_in)) {
put_page(page_in);
page_in = NULL;
}
--
2.27.0
\
 
 \ /
  Last update: 2023-03-26 23:22    [W:0.063 / U:1.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site