* [PATCH] cifs: Remove {cifs,nfs}_fscache_release_page()
@ 2022-08-08 14:33 David Howells
2022-08-08 14:51 ` Jeff Layton
0 siblings, 1 reply; 3+ messages in thread
From: David Howells @ 2022-08-08 14:33 UTC (permalink / raw)
To: willy
Cc: Jeff Layton, Steve French, linux-cifs, samba-technical,
linux-fsdevel, dhowells, linux-kernel
Remove {cifs,nfs}_fscache_release_page() from fs/cifs/fscache.h. This
functionality got built directly into cifs_release_folio() and will
hopefully be replaced with netfs_release_folio() at some point.
The "nfs_" version is a copy and paste error and should've been altered to
read "cifs_". That can also be removed.
Reported-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Jeff Layton <jlayton@redhat.com>
cc: Steve French <smfrench@gmail.com>
cc: linux-cifs@vger.kernel.org
cc: samba-technical@lists.samba.org
cc: linux-fsdevel@vger.kernel.org
---
fs/cifs/fscache.h | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/fs/cifs/fscache.h b/fs/cifs/fscache.h
index aa3b941a5555..67b601041f0a 100644
--- a/fs/cifs/fscache.h
+++ b/fs/cifs/fscache.h
@@ -108,17 +108,6 @@ static inline void cifs_readpage_to_fscache(struct inode *inode,
__cifs_readpage_to_fscache(inode, page);
}
-static inline int cifs_fscache_release_page(struct page *page, gfp_t gfp)
-{
- if (PageFsCache(page)) {
- if (current_is_kswapd() || !(gfp & __GFP_FS))
- return false;
- wait_on_page_fscache(page);
- fscache_note_page_release(cifs_inode_cookie(page->mapping->host));
- }
- return true;
-}
-
#else /* CONFIG_CIFS_FSCACHE */
static inline
void cifs_fscache_fill_coherency(struct inode *inode,
@@ -154,11 +143,6 @@ cifs_readpage_from_fscache(struct inode *inode, struct page *page)
static inline
void cifs_readpage_to_fscache(struct inode *inode, struct page *page) {}
-static inline int nfs_fscache_release_page(struct page *page, gfp_t gfp)
-{
- return true; /* May release page */
-}
-
#endif /* CONFIG_CIFS_FSCACHE */
#endif /* _CIFS_FSCACHE_H */
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] cifs: Remove {cifs,nfs}_fscache_release_page()
2022-08-08 14:33 [PATCH] cifs: Remove {cifs,nfs}_fscache_release_page() David Howells
@ 2022-08-08 14:51 ` Jeff Layton
2022-08-11 2:27 ` Steve French
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Layton @ 2022-08-08 14:51 UTC (permalink / raw)
To: David Howells, willy
Cc: Steve French, linux-cifs, samba-technical, linux-fsdevel, linux-kernel
On Mon, 2022-08-08 at 15:33 +0100, David Howells wrote:
> Remove {cifs,nfs}_fscache_release_page() from fs/cifs/fscache.h. This
> functionality got built directly into cifs_release_folio() and will
> hopefully be replaced with netfs_release_folio() at some point.
>
> The "nfs_" version is a copy and paste error and should've been altered to
> read "cifs_". That can also be removed.
>
> Reported-by: Matthew Wilcox <willy@infradead.org>
> Signed-off-by: David Howells <dhowells@redhat.com>
> cc: Jeff Layton <jlayton@redhat.com>
> cc: Steve French <smfrench@gmail.com>
> cc: linux-cifs@vger.kernel.org
> cc: samba-technical@lists.samba.org
> cc: linux-fsdevel@vger.kernel.org
> ---
>
> fs/cifs/fscache.h | 16 ----------------
> 1 file changed, 16 deletions(-)
>
> diff --git a/fs/cifs/fscache.h b/fs/cifs/fscache.h
> index aa3b941a5555..67b601041f0a 100644
> --- a/fs/cifs/fscache.h
> +++ b/fs/cifs/fscache.h
> @@ -108,17 +108,6 @@ static inline void cifs_readpage_to_fscache(struct inode *inode,
> __cifs_readpage_to_fscache(inode, page);
> }
>
> -static inline int cifs_fscache_release_page(struct page *page, gfp_t gfp)
> -{
> - if (PageFsCache(page)) {
> - if (current_is_kswapd() || !(gfp & __GFP_FS))
> - return false;
> - wait_on_page_fscache(page);
> - fscache_note_page_release(cifs_inode_cookie(page->mapping->host));
> - }
> - return true;
> -}
> -
> #else /* CONFIG_CIFS_FSCACHE */
> static inline
> void cifs_fscache_fill_coherency(struct inode *inode,
> @@ -154,11 +143,6 @@ cifs_readpage_from_fscache(struct inode *inode, struct page *page)
> static inline
> void cifs_readpage_to_fscache(struct inode *inode, struct page *page) {}
>
> -static inline int nfs_fscache_release_page(struct page *page, gfp_t gfp)
> -{
> - return true; /* May release page */
> -}
> -
> #endif /* CONFIG_CIFS_FSCACHE */
>
> #endif /* _CIFS_FSCACHE_H */
>
>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cifs: Remove {cifs,nfs}_fscache_release_page()
2022-08-08 14:51 ` Jeff Layton
@ 2022-08-11 2:27 ` Steve French
0 siblings, 0 replies; 3+ messages in thread
From: Steve French @ 2022-08-11 2:27 UTC (permalink / raw)
To: Jeff Layton
Cc: David Howells, Matthew Wilcox, CIFS, samba-technical,
linux-fsdevel, LKML
merged into cifs-2.6.git for-next
On Mon, Aug 8, 2022 at 9:51 AM Jeff Layton <jlayton@kernel.org> wrote:
>
> On Mon, 2022-08-08 at 15:33 +0100, David Howells wrote:
> > Remove {cifs,nfs}_fscache_release_page() from fs/cifs/fscache.h. This
> > functionality got built directly into cifs_release_folio() and will
> > hopefully be replaced with netfs_release_folio() at some point.
> >
> > The "nfs_" version is a copy and paste error and should've been altered to
> > read "cifs_". That can also be removed.
> >
> > Reported-by: Matthew Wilcox <willy@infradead.org>
> > Signed-off-by: David Howells <dhowells@redhat.com>
> > cc: Jeff Layton <jlayton@redhat.com>
> > cc: Steve French <smfrench@gmail.com>
> > cc: linux-cifs@vger.kernel.org
> > cc: samba-technical@lists.samba.org
> > cc: linux-fsdevel@vger.kernel.org
> > ---
> >
> > fs/cifs/fscache.h | 16 ----------------
> > 1 file changed, 16 deletions(-)
> >
> > diff --git a/fs/cifs/fscache.h b/fs/cifs/fscache.h
> > index aa3b941a5555..67b601041f0a 100644
> > --- a/fs/cifs/fscache.h
> > +++ b/fs/cifs/fscache.h
> > @@ -108,17 +108,6 @@ static inline void cifs_readpage_to_fscache(struct inode *inode,
> > __cifs_readpage_to_fscache(inode, page);
> > }
> >
> > -static inline int cifs_fscache_release_page(struct page *page, gfp_t gfp)
> > -{
> > - if (PageFsCache(page)) {
> > - if (current_is_kswapd() || !(gfp & __GFP_FS))
> > - return false;
> > - wait_on_page_fscache(page);
> > - fscache_note_page_release(cifs_inode_cookie(page->mapping->host));
> > - }
> > - return true;
> > -}
> > -
> > #else /* CONFIG_CIFS_FSCACHE */
> > static inline
> > void cifs_fscache_fill_coherency(struct inode *inode,
> > @@ -154,11 +143,6 @@ cifs_readpage_from_fscache(struct inode *inode, struct page *page)
> > static inline
> > void cifs_readpage_to_fscache(struct inode *inode, struct page *page) {}
> >
> > -static inline int nfs_fscache_release_page(struct page *page, gfp_t gfp)
> > -{
> > - return true; /* May release page */
> > -}
> > -
> > #endif /* CONFIG_CIFS_FSCACHE */
> >
> > #endif /* _CIFS_FSCACHE_H */
> >
> >
>
> Reviewed-by: Jeff Layton <jlayton@kernel.org>
--
Thanks,
Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-11 2:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-08 14:33 [PATCH] cifs: Remove {cifs,nfs}_fscache_release_page() David Howells
2022-08-08 14:51 ` Jeff Layton
2022-08-11 2:27 ` Steve French
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.