Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2237441ybk; Sun, 17 May 2020 14:49:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyin5InJ7IkEUVEtppECf2dItlK/6RsieG4b6pCqhr3+43sNkZsYN4/HM6dhBDZ9YQXUmoN X-Received: by 2002:aa7:c453:: with SMTP id n19mr11220137edr.218.1589752165135; Sun, 17 May 2020 14:49:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589752165; cv=none; d=google.com; s=arc-20160816; b=uE2BB1Av1emgfbNw+eWk49RzH5CsSCzQUOQEBMOZWySz/FTBUVNTnvovGsYlihQIyF sSkxDfpBZ8Ok8zHz8UzUPlJDw+sKL+YvdPbnVQp5idlas8d0e6rY2guAe5wirElMiaqq +rWI/K6sfhfNKtghRd/MIH8SaTV8QrtYv+8e3C38d48N3gd1i0wkPx4f1xUHLUwCCNUR DkbnaEI3k7OiZmJrbgfhlJYHVFqTQ6Bvji0mb+nHBxCVW/V+cTMoqr51sEZUZTjf+PPj m/gFhJJogF7GXplVxKz4roqoHPgRZNY0fv3gCo6qwzZc139/8eGijlSVk4sWsCyym9cG wVZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=OFT0iCFHjK0nh8uePEVriaTeaCB6BcpTAMIRJKLJOK8=; b=F2zOl+ZL5J/mbuaSHrqFYi+n+/j0hvFyqd3Ny2Av5GKfmBu/SzYLoYAFkJNkK9k2dC IZVvhmVWDosbqORmyr8dkfRBFMhMHBJqxhXy8SiAddoo0fO/aTIsrs7i5tA68UVwUmpL T/qUC4t90mOJjMMdUo9eyixexuQeDmEDecjbnJ00MVzBc6jL7N4PwG5TQmNTYzK+ysIy seaoqoCffBENDzQtECjhqyfQTuccILlZOKLTKZm9DzyUi8/rkPGfyhdy/tJdrDdX4EBG /7U4XNu1KGoDXw6Wwx48A/bbz1wzBLF+wSJs2PbUcLhVxyeyqm7dJNTA07lBVSQo90Xs T8dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cloud.ionos.com header.s=google header.b=b2OunlJb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q23si5600425edg.593.2020.05.17.14.49.02; Sun, 17 May 2020 14:49:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cloud.ionos.com header.s=google header.b=b2OunlJb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726953AbgEQVrf (ORCPT + 99 others); Sun, 17 May 2020 17:47:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726806AbgEQVr3 (ORCPT ); Sun, 17 May 2020 17:47:29 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A32ABC05BD0A for ; Sun, 17 May 2020 14:47:29 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id e1so9578950wrt.5 for ; Sun, 17 May 2020 14:47:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.ionos.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=OFT0iCFHjK0nh8uePEVriaTeaCB6BcpTAMIRJKLJOK8=; b=b2OunlJb1CqG4qMvf91CNV+d8tunFadtVS8JCoT8WqCC9BY9AeF54XVDVBqhqjfXF/ 8OPXXY8BQ3dm7EE/i+F4/9JmQtxgkNDL5deNYT17giGKWgdRYlaG3i6daLy5HIsw/PfM 20vdfTALNGIdNIiamhNH0OdiJmHmrzuDPCcl2Q1mjWwTDMJktm4aF7kdIxdy0DI3mayq 0K35ZpmTBYtxEJOs63UQgGJfbmZNvtcvtVvm076xjtcI2succM5Q8iou6S3qSQ3C5Vl0 FjJL13aUg0ZvNStsIAe4mAz1kVDyZ14fOCMqUqqszcwIVyNJAwF8wSko6zY+IN9q/m4/ GWhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=OFT0iCFHjK0nh8uePEVriaTeaCB6BcpTAMIRJKLJOK8=; b=UeOfTW9KfxpTUYpHIdpbOF+NqzRJZBFDtnKo6FGE3Ek59vP/86BYFua7YMGLGs8xSP GtfH3DGx6mG7nZePX0mw/AiJH0CuTm0/hS1Q+pNXRdg6Ea7TDZUyfw1AYi7oMhq0+f8R ZAy4tbB7gWvRSuhY1dEqk48Rg93+dT2jtpbUpWfvNtM9o35ZiBdAnESnN/sB+qAmJW2h PAu/mr/AVhKDgvZX4XqSXD1h9bwmvpGMWNdye4FD5YZMcm/RVzgKxRb8yLS20YgiUAge 1xShNSNSbw2YOR1/6PM7X5MrtN/7/D1juka27XPfUODTaY/PE08TOX/q1el35rWVXDST LcyA== X-Gm-Message-State: AOAM531eD7Zr2mOAIZB/hPmkP59a3Mh43wDpKq54wF6N1YPgBXAq5Xa6 tIkmQtl4CjdMCkq3WGhH1M1pVg== X-Received: by 2002:adf:ea90:: with SMTP id s16mr16142123wrm.19.1589752048332; Sun, 17 May 2020 14:47:28 -0700 (PDT) Received: from ls00508.pb.local ([2001:1438:4010:2540:bc3e:92a1:7010:2763]) by smtp.gmail.com with ESMTPSA id v126sm14441244wmb.4.2020.05.17.14.47.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2020 14:47:27 -0700 (PDT) From: Guoqing Jiang To: akpm@linux-foundation.org, viro@zeniv.linux.org.uk Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, david@fromorbit.com, hch@infradead.org, willy@infradead.org, Guoqing Jiang , Jaegeuk Kim , Chao Yu , linux-f2fs-devel@lists.sourceforge.net Subject: [PATCH 05/10] f2fs: use attach/detach_page_private Date: Sun, 17 May 2020 23:47:13 +0200 Message-Id: <20200517214718.468-6-guoqing.jiang@cloud.ionos.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200517214718.468-1-guoqing.jiang@cloud.ionos.com> References: <20200517214718.468-1-guoqing.jiang@cloud.ionos.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since the new pair function is introduced, we can call them to clean the code in f2fs.h. Cc: Jaegeuk Kim Cc: Chao Yu Cc: linux-f2fs-devel@lists.sourceforge.net Acked-by: Chao Yu Signed-off-by: Guoqing Jiang --- 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