lkml.org 
[lkml]   [2024]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v4 05/12] cifs: drop usage of page_file_offset
    Date
    From: Kairui Song <kasong@tencent.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@tencent.com>
    Cc: Steve French <stfrench@microsoft.com>
    Cc: Namjae Jeon <linkinjeon@kernel.org>
    Cc: Paulo Alcantara <pc@manguebit.com>
    Cc: Shyam Prasad N <sprasad@microsoft.com>
    Cc: Bharath SM <bharathsm@microsoft.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 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

    \
     
     \ /
      Last update: 2024-05-27 18:12    [W:2.133 / U:0.060 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site