lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230621094359.3827832-2-heyunlei@oppo.com>
Date:   Wed, 21 Jun 2023 17:43:59 +0800
From:   Yunlei He <heyunlei@...o.com>
To:     jaegeuk@...nel.org, chao@...nel.org
Cc:     linux-f2fs-devel@...ts.sourceforge.net,
        linux-kernel@...r.kernel.org, Yunlei He <heyunlei@...o.com>
Subject: [f2fs-dev][PATCH 2/2] f2fs: truncate pages if move file range success

If move file range success, it should remove old data from
src and dst page cache.

Signed-off-by: Yunlei He <heyunlei@...o.com>
---
 fs/f2fs/file.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 4adcf62e2665..25ef36f2376a 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -2897,6 +2897,9 @@ static int f2fs_move_file_range(struct file *file_in, loff_t pos_in,
 			f2fs_mark_inode_dirty_sync(dst, false);
 		}
 
+		truncate_pagecache_range(src, pos_in, pos_in + len - 1);
+		truncate_pagecache_range(dst, pos_out, pos_out + len - 1);
+
 		f2fs_update_time(F2FS_I_SB(src), REQ_TIME);
 	}
 
-- 
2.40.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ