[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240423170339.54131-6-ryncsn@gmail.com>
Date: Wed, 24 Apr 2024 01:03:36 +0800
From: Kairui Song <ryncsn@...il.com>
To: linux-mm@...ck.org
Cc: Andrew Morton <akpm@...ux-foundation.org>,
"Huang, Ying" <ying.huang@...el.com>,
Matthew Wilcox <willy@...radead.org>,
Chris Li <chrisl@...nel.org>,
Barry Song <v-songbaohua@...o.com>,
Ryan Roberts <ryan.roberts@....com>,
Neil Brown <neilb@...e.de>,
Minchan Kim <minchan@...nel.org>,
Hugh Dickins <hughd@...gle.com>,
David Hildenbrand <david@...hat.com>,
Yosry Ahmed <yosryahmed@...gle.com>,
linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org,
Kairui Song <kasong@...cent.com>,
Steve French <stfrench@...rosoft.com>,
Namjae Jeon <linkinjeon@...nel.org>,
Paulo Alcantara <pc@...guebit.com>,
Shyam Prasad N <sprasad@...rosoft.com>,
Bharath SM <bharathsm@...rosoft.com>
Subject: [PATCH v2 5/8] cifs: drop usage of page_file_offset
From: Kairui Song <kasong@...cent.com>
page_file_offset is only needed for mixed usage of page cache and
swap cache, for pure page cache usage, the caller can just use
page_offset instead.
It can't be a swap cache page here, so just drop it and convert it to
use folio.
Signed-off-by: Kairui Song <kasong@...cent.com>
Cc: Steve French <stfrench@...rosoft.com>
Cc: Namjae Jeon <linkinjeon@...nel.org>
Cc: Paulo Alcantara <pc@...guebit.com>
Cc: Shyam Prasad N <sprasad@...rosoft.com>
Cc: Bharath SM <bharathsm@...rosoft.com>
Signed-off-by: Kairui Song <kasong@...cent.com>
---
fs/smb/client/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/smb/client/file.c b/fs/smb/client/file.c
index 16aadce492b2..56ebc0b1444d 100644
--- a/fs/smb/client/file.c
+++ b/fs/smb/client/file.c
@@ -4749,7 +4749,7 @@ static int cifs_readpage_worker(struct file *file, struct page *page,
static int cifs_read_folio(struct file *file, struct folio *folio)
{
struct page *page = &folio->page;
- loff_t offset = page_file_offset(page);
+ loff_t offset = folio_pos(folio);
int rc = -EACCES;
unsigned int xid;
--
2.44.0
Powered by blists - more mailing lists