Re: [Regression 6.1.y] From "cifs: Fix flushing, invalidation and file size with copy_file_range()"

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

 



I thought that it was "safer" since if it was misapplied to version where new folio rc behavior it wouldn't regress anything 

On Sat, Jan 13, 2024, 11:02 Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
On Fri, Jan 12, 2024 at 11:20:53PM -0600, Steve French wrote:
> Here is a patch similar to what David suggested.  Seems

Similar to, but worse.

> +++ b/fs/smb/client/cifsfs.c
> @@ -1240,7 +1240,7 @@ static int cifs_flush_folio(struct inode *inode, loff_t pos, loff_t *_fstart, lo
>       int rc = 0;

>       folio = filemap_get_folio(inode->i_mapping, index);
> -     if (IS_ERR(folio))
> +     if ((!folio) || (IS_ERR(folio)))
>               return 0;

filemap_get_folio() cannot return an err_ptr in 6.1, so this should
simply be:

-       if (IS_ERR(folio))
+       if (!folio)


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux