Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp571176pxb; Thu, 23 Sep 2021 06:26:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWJ6RZJHbOoYaT2MFQDlbumLG5Q4QKPciWQL3vaSlqujKiYJwtbvDUrGMBFEzZXuYqOf8H X-Received: by 2002:aa7:dd8c:: with SMTP id g12mr5502054edv.280.1632403560695; Thu, 23 Sep 2021 06:26:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1632403560; cv=pass; d=google.com; s=arc-20160816; b=PNEvz5YL2zdYLAUvDFaLQEW+SaVdNiWbF7I3cWyUY53VuNCJwo+kwmBcvy7sUIlSKg pM0xRakio6S739n4TemV/hnmI3LxBcXI6tgtRxoRe0hurO6zRfU1AS+c1OgHlF+/78sq A4GjAj2MWTFO1bswVbpNtqt5sWTY9JZ72wZoz2/myfhYXDvle7K/5XUNLyiHINu+bn03 UhLStk1c1faXPfBbsSzWtL176adk7yJJ4QlFtIsYfO/0nRJYRZIzdmBiUz3lc1WzDbDY OWUxm+rZeuz/AWOunX8yJn3i1azmheYY4E/8tOVmtoebPWICsxfY081m+XfFA5DoB3Vl KqlQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:subject:message-id:cc:to:from :dkim-signature; bh=YcxkPiJx6Ikxp0ynHw1Dz+L3wBzcP9EXpk2Zzl1PCl4=; b=BqSxblw/Nj4amzjDTIfYWyyVJmtjV2UOXRj1QvAO5eXKGRsUpeFJnblc8h8IF820SZ PLVJ1rorNmrLYgxxIno9HHbdyx1LOHUawXl23hfQaHr5UM+CiIa/X0Gm0r7uBnd2ur6p BRhLtAzCuRLRA1+CPftbGuh+mJR8O+ZQNNlNAP/vxH0E6qM6jMOr0rhLWyXq2hHRaFbI CGV9bTT9P+T8Z3e8m+pYvOcg9IzrCp5A99umC7fuJiNGZIjyE6y26c3jsT0g8lXdPyLC oHZ6Trzx9qquQyJ7lz/CLTQi+3ofFVqpvblZb+rUMd/rhjgboyUUmblRScqE4jDxMZv7 KzWw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mykernel.net header.s=zohomail header.b="OAeo3R/b"; arc=pass (i=1 spf=pass spfdomain=mykernel.net dkim=pass dkdomain=mykernel.net dmarc=pass fromdomain=mykernel.net>); 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 p15si7615557edj.97.2021.09.23.06.25.37; Thu, 23 Sep 2021 06:26:00 -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=@mykernel.net header.s=zohomail header.b="OAeo3R/b"; arc=pass (i=1 spf=pass spfdomain=mykernel.net dkim=pass dkdomain=mykernel.net dmarc=pass fromdomain=mykernel.net>); 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 S241283AbhIWNZh (ORCPT + 99 others); Thu, 23 Sep 2021 09:25:37 -0400 Received: from sender2-op-o12.zoho.com.cn ([163.53.93.243]:17269 "EHLO sender2-op-o12.zoho.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241268AbhIWNZg (ORCPT ); Thu, 23 Sep 2021 09:25:36 -0400 X-Greylist: delayed 910 seconds by postgrey-1.27 at vger.kernel.org; Thu, 23 Sep 2021 09:25:36 EDT ARC-Seal: i=1; a=rsa-sha256; t=1632402519; cv=none; d=zoho.com.cn; s=zohoarc; b=USt4P00lNZZPNFMSumV/GycrF2tO2fKY8/ClpqdludyrNoFvkUovVomhVmsX6bWSky95dzqEl/+q51Pp7wQjN98Kee5UnyA1eq5IOpQvyi8bmQP1fb9rOh0nsBjJcsMibjXgWgOoH8lRprGv4y/0+XzBvjBz6lqHIdEhla0L6sI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com.cn; s=zohoarc; t=1632402519; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=YcxkPiJx6Ikxp0ynHw1Dz+L3wBzcP9EXpk2Zzl1PCl4=; b=eIgoR/BVZrZMhGaM2ewLhBaQsrwvTn7bThx3r/0azeLUM3tHIqwEDxYLWoYKQE2aKsP75NhsAG46RgGKnkSn0U4YeNzKUhnfRX6VamXWtV8lYLr8fWWEu59WHe4x2vu1620w7Nl4f4N5G55uoK/wJYzAzYbCn/S91QNvcFWb8P4= ARC-Authentication-Results: i=1; mx.zoho.com.cn; dkim=pass header.i=mykernel.net; spf=pass smtp.mailfrom=cgxu519@mykernel.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1632402519; s=zohomail; d=mykernel.net; i=cgxu519@mykernel.net; h=From:To:Cc:Message-ID:Subject:Date:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Content-Type; bh=YcxkPiJx6Ikxp0ynHw1Dz+L3wBzcP9EXpk2Zzl1PCl4=; b=OAeo3R/bEBj3E+lbzVDff2g72aNLcqL3jxZRwYe4TiR9NCtnj55RAKPCJgb/cEQ1 eShD7V7ouJPRFkSmStmbkZSFTq8dsE914Zk9hHVNsVRYIE4ijYEnQGc5qF7bCmsnwLG LsO4yHkMEskGjCW2LJjm/Nt1kBEWO77fJmP0lPzU= Received: from localhost.localdomain (81.71.33.115 [81.71.33.115]) by mx.zoho.com.cn with SMTPS id 1632402518088813.5030221103862; Thu, 23 Sep 2021 21:08:38 +0800 (CST) From: Chengguang Xu To: miklos@szeredi.hu, jack@suse.cz, amir73il@gmail.com Cc: linux-fsdevel@vger.kernel.org, linux-unionfs@vger.kernel.org, linux-kernel@vger.kernel.org, Chengguang Xu Message-ID: <20210923130814.140814-4-cgxu519@mykernel.net> Subject: [RFC PATCH v5 03/10] ovl: implement overlayfs' ->evict_inode operation Date: Thu, 23 Sep 2021 21:08:07 +0800 X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210923130814.140814-1-cgxu519@mykernel.net> References: <20210923130814.140814-1-cgxu519@mykernel.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoCNMailClient: External Content-Type: text/plain; charset=utf8 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Implement overlayfs' ->evict_inode operation, so that we can clear dirty flags of overlayfs inode. Signed-off-by: Chengguang Xu --- fs/overlayfs/super.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index 51886ba6130a..2ab77adf7256 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -406,11 +406,18 @@ static int ovl_remount(struct super_block *sb, int *f= lags, char *data) =09return ret; } =20 +static void ovl_evict_inode(struct inode *inode) +{ +=09inode->i_state &=3D ~I_DIRTY_ALL; +=09clear_inode(inode); +} + static const struct super_operations ovl_super_operations =3D { =09.alloc_inode=09=3D ovl_alloc_inode, =09.free_inode=09=3D ovl_free_inode, =09.destroy_inode=09=3D ovl_destroy_inode, =09.drop_inode=09=3D generic_delete_inode, +=09.evict_inode=09=3D ovl_evict_inode, =09.put_super=09=3D ovl_put_super, =09.sync_fs=09=3D ovl_sync_fs, =09.statfs=09=09=3D ovl_statfs, --=20 2.27.0