[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240209142901.126894-10-da.gomez@samsung.com>
Date: Fri, 9 Feb 2024 14:29:04 +0000
From: Daniel Gomez <da.gomez@...sung.com>
To: "viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>,
"brauner@...nel.org" <brauner@...nel.org>, "jack@...e.cz" <jack@...e.cz>,
"hughd@...gle.com" <hughd@...gle.com>, "akpm@...ux-foundation.org"
<akpm@...ux-foundation.org>
CC: "dagmcr@...il.com" <dagmcr@...il.com>, "linux-fsdevel@...r.kernel.org"
<linux-fsdevel@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "linux-mm@...ck.org" <linux-mm@...ck.org>,
"willy@...radead.org" <willy@...radead.org>, "hch@...radead.org"
<hch@...radead.org>, "mcgrof@...nel.org" <mcgrof@...nel.org>, Pankaj Raghav
<p.raghav@...sung.com>, "gost.dev@...sung.com" <gost.dev@...sung.com>,
"Daniel Gomez" <da.gomez@...sung.com>
Subject: [RFC PATCH 9/9] shmem: enable per-block uptodate
In the write_end() function, mark only the blocks that are being written
as uptodate.
Signed-off-by: Daniel Gomez <da.gomez@...sung.com>
---
mm/shmem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/shmem.c b/mm/shmem.c
index 2157a87b2e4b..8ff2d190a9e4 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -2964,7 +2964,7 @@ shmem_write_end(struct file *file, struct address_space *mapping,
if (pos + copied > inode->i_size)
i_size_write(inode, pos + copied);
- shmem_set_range_uptodate(folio, 0, folio_size(folio));
+ shmem_set_range_uptodate(folio, offset_in_folio(folio, pos), len);
folio_mark_dirty(folio);
folio_unlock(folio);
folio_put(folio);
--
2.43.0
Powered by blists - more mailing lists