On 1/23/24 6:32 AM, David Howells wrote:
> cachefiles_ondemand_init_object() as called from cachefiles_open_file() and
> cachefiles_create_tmpfile() does not check if object->ondemand is set
> before dereferencing it, leading to an oops something like:
>
> RIP:
Remove afs_dynroot_d_revalidate() as it is redundant as all it does is
return 1 and the caller assumes that if the op is not given.
Suggested-by: Alexander Viro
Signed-off-by: David Howells
cc: Marc Dionne
cc: linux-...@lists.infradead.org
cc: linux-fsde...@vger.kernel.org
---
In afs_proc_addr_prefs_show(), we need to unlock the RCU read lock in both
places before returning (and not lock it again).
Fixes: f94f70d39cc2 ("afs: Provide a way to configure address priorities")
Reported-by: kernel test robot
Closes:
When afs does a lookup, it tries to use FS.InlineBulkStatus to preemptively
look up a bunch of files in the parent directory and cache this locally, on
the basis that we might want to look at them too (for example if someone
does an ls on a directory, they may want want to then stat every file
There appears to be a race between silly-rename files being created/removed
and various userspace tools iterating over the contents of a directory,
leading to such errors as:
find: './kernel/.tmp_cpio_dir/include/dt-bindings/reset/.__afs2080': No
such file or directory
tar:
cachefiles_ondemand_init_object() as called from cachefiles_open_file() and
cachefiles_create_tmpfile() does not check if object->ondemand is set
before dereferencing it, leading to an oops something like:
RIP: 0010:cachefiles_ondemand_init_object+0x9/0x41
...
Call Trace:
From: Dan Carpenter
The netfs_grab_folio_for_write() function doesn't return NULL, it returns
error pointers. Update the check accordingly.
Fixes: c38f4e96e605 ("netfs: Provide func to copy data to pagecache for
buffered write")
Signed-off-by: Dan Carpenter
Signed-off-by: David Howells
Filesystems should use folio->index and folio->mapping, instead of
folio_index(folio), folio_mapping() and folio_file_mapping() since
they know that it's in the pagecache.
Change this automagically with:
perl -p -i -e 's/folio_mapping[(]([^)]*)[)]/\1->mapping/g' fs/smb/client/*.c
perl -p -i -e
From: Dan Carpenter
This function dereferences "cache" and then checks if it's
IS_ERR_OR_NULL(). Check first, then dereference.
Fixes: 9549332df4ed ("fscache: Implement cache registration")
Signed-off-by: Dan Carpenter
Signed-off-by: David Howells
Link:
Filesystems should use folio->index and folio->mapping, instead of
folio_index(folio), folio_mapping() and folio_file_mapping() since
they know that it's in the pagecache.
Change this automagically with:
perl -p -i -e 's/folio_mapping[(]([^)]*)[)]/\1->mapping/g' fs/afs/*.c
perl -p -i -e
Filesystems should use folio->index and folio->mapping, instead of
folio_index(folio), folio_mapping() and folio_file_mapping() since
they know that it's in the pagecache.
Change this automagically with:
perl -p -i -e 's/folio_mapping[(]([^)]*)[)]/\1->mapping/g' fs/netfs/*.c
perl -p -i -e
Hi Christian,
Here are some miscellaneous fixes for netfslib and a number of filesystems:
(1) Replace folio_index() with folio->index in netfs, afs and cifs.
(2) Fix an oops in fscache_put_cache().
(3) Fix error handling in netfs_perform_write().
(4) Fix an oops in cachefiles when not
Jingbo Xu wrote:
> > - ret = cachefiles_ondemand_init_object(object);
> > - if (ret < 0)
> > - goto err_unuse;
> > + if (object->ondemand) {
> > + ret = cachefiles_ondemand_init_object(object);
> > + if (ret < 0)
> > + goto err_unuse;
> > +
Jeff Layton wrote:
> > Filesystems should not be using folio->index not folio_index(folio) and
>
> I think you mean "should be" here.
Ach. I forgot to update the patch descriptions!
David
On Mon, Jan 22, 2024 at 10:38:58AM -0500, Jeff Layton wrote:
> On Mon, 2024-01-22 at 12:38 +, David Howells wrote:
> > Filesystems should not be using folio->index not folio_index(folio) and
>
> I think you mean "should be" here.
Also these are not internal functions! They're just functions
On Mon, 2024-01-22 at 12:38 +, David Howells wrote:
> Hi Christian,
>
> Here are some miscellaneous fixes for netfslib and a number of filesystems:
>
> (1) Replace folio_index() with folio->index in netfs, afs and cifs.
>
> (2) Fix an oops in fscache_put_cache().
>
> (3) Fix error
On Mon, 2024-01-22 at 12:38 +, David Howells wrote:
> Filesystems should not be using folio->index not folio_index(folio) and
I think you mean "should be" here.
> folio->mapping, not folio_mapping() or folio_file_mapping() in filesystem
> code.
>
> Change this automagically with:
>
> perl
On 2024/1/22 20:38, David Howells wrote:
cachefiles_ondemand_init_object() as called from cachefiles_open_file() and
cachefiles_create_tmpfile() does not check if object->ondemand is set
before dereferencing it, leading to an oops something like:
RIP:
On Mon, Jan 22, 2024 at 12:38:33PM +, David Howells wrote:
> Hi Christian,
>
> Here are some miscellaneous fixes for netfslib and a number of filesystems:
>
> (1) Replace folio_index() with folio->index in netfs, afs and cifs.
>
> (2) Fix an oops in fscache_put_cache().
>
> (3) Fix
On Mon, 22 Jan 2024 11:49:59 +, David Howells wrote:
> Update the MAINTAINERS records for netfs and cachefiles to reflect a change of
> mailing list for both as Red Hat no longer archives the mailing list in a
> publicly accessible place.
>
> Also add Jeff Layton as a reviewer.
Yay!
>
>
On 1/22/24 8:38 PM, David Howells wrote:
> cachefiles_ondemand_init_object() as called from cachefiles_open_file() and
> cachefiles_create_tmpfile() does not check if object->ondemand is set
> before dereferencing it, leading to an oops something like:
>
> RIP:
In afs_proc_addr_prefs_show(), we need to unlock the RCU read lock in both
places before returning (and not lock it again).
Fixes: f94f70d39cc2 ("afs: Provide a way to configure address priorities")
Reported-by: kernel test robot
Closes:
Remove afs_dynroot_d_revalidate() as it is redundant as all it does is
return 1 and the caller assumes that if the op is not given.
Suggested-by: Alexander Viro
Signed-off-by: David Howells
cc: Marc Dionne
cc: linux-...@lists.infradead.org
cc: linux-fsde...@vger.kernel.org
---
cachefiles_ondemand_init_object() as called from cachefiles_open_file() and
cachefiles_create_tmpfile() does not check if object->ondemand is set
before dereferencing it, leading to an oops something like:
RIP: 0010:cachefiles_ondemand_init_object+0x9/0x41
...
Call Trace:
When afs does a lookup, it tries to use FS.InlineBulkStatus to preemptively
look up a bunch of files in the parent directory and cache this locally, on
the basis that we might want to look at them too (for example if someone
does an ls on a directory, they may want want to then stat every file
There appears to be a race between silly-rename files being created/removed
and various userspace tools iterating over the contents of a directory,
leading to such errors as:
find: './kernel/.tmp_cpio_dir/include/dt-bindings/reset/.__afs2080': No
such file or directory
tar:
From: Dan Carpenter
The netfs_grab_folio_for_write() function doesn't return NULL, it returns
error pointers. Update the check accordingly.
Fixes: c38f4e96e605 ("netfs: Provide func to copy data to pagecache for
buffered write")
Signed-off-by: Dan Carpenter
Signed-off-by: David Howells
From: Dan Carpenter
This function dereferences "cache" and then checks if it's
IS_ERR_OR_NULL(). Check first, then dereference.
Fixes: 9549332df4ed ("fscache: Implement cache registration")
Signed-off-by: Dan Carpenter
Signed-off-by: David Howells
Link:
Filesystems should not be using folio->index not folio_index(folio) and
folio->mapping, not folio_mapping() or folio_file_mapping() in filesystem
code.
Change this automagically with:
perl -p -i -e 's/folio_mapping[(]([^)]*)[)]/\1->mapping/g' fs/netfs/*.c
perl -p -i -e
Filesystems should not be using folio->index not folio_index(folio) and
folio->mapping, not folio_mapping() or folio_file_mapping() in filesystem
code.
Change this automagically with:
perl -p -i -e 's/folio_mapping[(]([^)]*)[)]/\1->mapping/g' fs/smb/client/*.c
perl -p -i -e
Filesystems should not be using folio->index not folio_index(folio) and
folio->mapping, not folio_mapping() or folio_file_mapping() in filesystem
code.
Change this automagically with:
perl -p -i -e 's/folio_mapping[(]([^)]*)[)]/\1->mapping/g' fs/afs/*.c
perl -p -i -e
Hi Christian,
Here are some miscellaneous fixes for netfslib and a number of filesystems:
(1) Replace folio_index() with folio->index in netfs, afs and cifs.
(2) Fix an oops in fscache_put_cache().
(3) Fix error handling in netfs_perform_write().
(4) Fix an oops in cachefiles when not
Add Jeff Layton as a reviewer in the MAINTAINERS file.
Signed-off-by: David Howells
Acked-by: Jeff Layton
cc: ne...@lists.linux.dev
cc: linux-fsde...@vger.kernel.org
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index ab5858d24ffc..2f4f4bf2e7f8
The publicly accessible archives for Red Hat mailing lists stop at Oct
2023; messages sent after that time are in internal-only archives.
Change the netfs and cachefiles mailing list to one that has publicly
accessible archives:
ne...@lists.linux.dev
Signed-off-by: David Howells
cc:
/dhowells/linux-fs.git/
tagged as netfs-lib-20240122.
Thanks,
David
David Howells (2):
netfs, cachefiles: Change mailing list
netfs: Add Jeff Layton as reviewer
MAINTAINERS | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
So far the fscache mode supports uncompressed data only, and the data
read from fscache is put directly into the target page cache. As the
support for compressed data in fscache mode is going to be introduced,
refactor the interface of reading fscache so that the following
compressed part could
Hi, Xiang,
On 1/22/24 3:42 PM, Gao Xiang wrote:
> Hi Jingbo,
>
> On 2024/1/22 15:12, Jingbo Xu wrote:
>> So far the fscache mode supports uncompressed data only, and the data
>> read from fscache is put directly into the target page cache. As the
>> support for compressed data in fscache mode
37 matches
Mail list logo