RE: [EXTERNAL] [PATCH v3 05/12] cifs: drop usage of page_file_offset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Wouldn't this make it harder to fix the regression when swap file support was temporarily removed from cifs.ko (due to the folio migration)?   I was hoping to come back to fixing swapfile support for cifs.ko in 6.10-rc (which used to pass the various xfstests for this but code got removed with folios/netfs changes).

-----Original Message-----
From: Kairui Song <ryncsn@xxxxxxxxx> 
Sent: Monday, April 29, 2024 2:05 PM
To: linux-mm@xxxxxxxxx
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>; Huang, Ying <ying.huang@xxxxxxxxx>; Matthew Wilcox <willy@xxxxxxxxxxxxx>; Chris Li <chrisl@xxxxxxxxxx>; Barry Song <v-songbaohua@xxxxxxxx>; Ryan Roberts <ryan.roberts@xxxxxxx>; Neil Brown <neilb@xxxxxxx>; Minchan Kim <minchan@xxxxxxxxxx>; Hugh Dickins <hughd@xxxxxxxxxx>; David Hildenbrand <david@xxxxxxxxxx>; Yosry Ahmed <yosryahmed@xxxxxxxxxx>; linux-fsdevel@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Kairui Song <kasong@xxxxxxxxxxx>; Steven French <Steven.French@xxxxxxxxxxxxx>; Namjae Jeon <linkinjeon@xxxxxxxxxx>; Paulo Alcantara (SUSE) <pc@xxxxxxxxxxxxx>; Shyam Prasad <Shyam.Prasad@xxxxxxxxxxxxx>; Bharath S M <bharathsm@xxxxxxxxxxxxx>
Subject: [EXTERNAL] [PATCH v3 05/12] cifs: drop usage of page_file_offset

[Some people who received this message don't often get email from ryncsn@xxxxxxxxx. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

From: Kairui Song <kasong@xxxxxxxxxxx>

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@xxxxxxxxxxx>
Cc: Steve French <stfrench@xxxxxxxxxxxxx>
Cc: Namjae Jeon <linkinjeon@xxxxxxxxxx>
Cc: Paulo Alcantara <pc@xxxxxxxxxxxxx>
Cc: Shyam Prasad N <sprasad@xxxxxxxxxxxxx>
Cc: Bharath SM <bharathsm@xxxxxxxxxxxxx>
---
 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 9be37d0fe724..388343b0fceb 100644
--- a/fs/smb/client/file.c
+++ b/fs/smb/client/file.c
@@ -4828,7 +4828,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






[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux