[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200517214718.468-6-guoqing.jiang@cloud.ionos.com>
Date: Sun, 17 May 2020 23:47:13 +0200
From: Guoqing Jiang <guoqing.jiang@...ud.ionos.com>
To: akpm@...ux-foundation.org, viro@...iv.linux.org.uk
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
david@...morbit.com, hch@...radead.org, willy@...radead.org,
Guoqing Jiang <guoqing.jiang@...ud.ionos.com>,
Jaegeuk Kim <jaegeuk@...nel.org>, Chao Yu <chao@...nel.org>,
linux-f2fs-devel@...ts.sourceforge.net
Subject: [PATCH 05/10] f2fs: use attach/detach_page_private
Since the new pair function is introduced, we can call them to clean the
code in f2fs.h.
Cc: Jaegeuk Kim <jaegeuk@...nel.org>
Cc: Chao Yu <chao@...nel.org>
Cc: linux-f2fs-devel@...ts.sourceforge.net
Acked-by: Chao Yu <yuchao0@...wei.com>
Signed-off-by: Guoqing Jiang <guoqing.jiang@...ud.ionos.com>
---
No change since RFC V3.
RFC V2 -> RFC V3
1. rename clear_page_private to detach_page_private.
RFC -> RFC V2
1. change the name of new functions to attach/clear_page_private.
fs/f2fs/f2fs.h | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 3574629b75ba..a4d4a947f603 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -3128,19 +3128,12 @@ static inline void f2fs_set_page_private(struct page *page,
if (PagePrivate(page))
return;
- get_page(page);
- SetPagePrivate(page);
- set_page_private(page, data);
+ attach_page_private(page, (void *)data);
}
static inline void f2fs_clear_page_private(struct page *page)
{
- if (!PagePrivate(page))
- return;
-
- set_page_private(page, 0);
- ClearPagePrivate(page);
- f2fs_put_page(page, 0);
+ detach_page_private(page);
}
/*
--
2.17.1
Powered by blists - more mailing lists