diff options
author | 2024-02-19 07:27:22 +0100 | |
---|---|---|
committer | 2024-02-21 11:36:53 +0530 | |
commit | 0e2a24afb99258acc147f7fbe6c1e178a951247d (patch) | |
tree | 86dbd040f7e34f92cae089312c5e2dfe5be29db8 /fs/xfs/scrub/xfile.c | |
parent | xfs: remove the xfile_pread/pwrite APIs (diff) | |
download | wireguard-linux-0e2a24afb99258acc147f7fbe6c1e178a951247d.tar.xz wireguard-linux-0e2a24afb99258acc147f7fbe6c1e178a951247d.zip |
xfs: don't try to handle non-update pages in xfile_obj_load
shmem_read_mapping_page_gfp always returns an uptodate page or an
ERR_PTR. Remove the code that tries to handle a non-uptodate page.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | fs/xfs/scrub/xfile.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/fs/xfs/scrub/xfile.c b/fs/xfs/scrub/xfile.c index c15cc8868880..4ec975977dcd 100644 --- a/fs/xfs/scrub/xfile.c +++ b/fs/xfs/scrub/xfile.c @@ -149,18 +149,14 @@ xfile_load( goto advance; } - if (PageUptodate(page)) { - /* - * xfile pages must never be mapped into userspace, so - * we skip the dcache flush. - */ - kaddr = kmap_local_page(page); - p = kaddr + offset_in_page(pos); - memcpy(buf, p, len); - kunmap_local(kaddr); - } else { - memset(buf, 0, len); - } + /* + * xfile pages must never be mapped into userspace, so + * we skip the dcache flush. + */ + kaddr = kmap_local_page(page); + p = kaddr + offset_in_page(pos); + memcpy(buf, p, len); + kunmap_local(kaddr); put_page(page); advance: |