]> git.baikalelectronics.ru Git - kernel.git/commit
netfs: Further cleanups after struct netfs_inode wrapper introduced
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 9 Jun 2022 22:04:01 +0000 (15:04 -0700)
committerDavid Howells <dhowells@redhat.com>
Fri, 10 Jun 2022 19:55:21 +0000 (20:55 +0100)
commite8e91508b493183ff347d0a37001f659b9a32774
tree14a782c3071531435a909ecdd44eb398eb401142
parent08909c5e20cbaa9203248072807023afd22fc89d
netfs: Further cleanups after struct netfs_inode wrapper introduced

Change the signature of netfs helper functions to take a struct netfs_inode
pointer rather than a struct inode pointer where appropriate, thereby
relieving the need for the network filesystem to convert its internal inode
format down to the VFS inode only for netfslib to bounce it back up.  For
type safety, it's better not to do that (and it's less typing too).

Give netfs_write_begin() an extra argument to pass in a pointer to the
netfs_inode struct rather than deriving it internally from the file
pointer.  Note that the ->write_begin() and ->write_end() ops are intended
to be replaced in the future by netfslib code that manages this without the
need to call in twice for each page.

netfs_readpage() and similar are intended to be pointed at directly by the
address_space_operations table, so must stick to the signature dictated by
the function pointers there.

Changes
=======
- Updated the kerneldoc comments and documentation [DH].

Signed-off-by: David Howells <dhowells@redhat.com>
cc: linux-cachefs@redhat.com
Link: https://lore.kernel.org/r/CAHk-=wgkwKyNmNdKpQkqZ6DnmUL-x9hp0YBnUGjaPFEAdxDTbw@mail.gmail.com/
14 files changed:
Documentation/filesystems/netfs_library.rst
fs/9p/v9fs.h
fs/9p/vfs_addr.c
fs/9p/vfs_inode.c
fs/afs/dynroot.c
fs/afs/inode.c
fs/afs/internal.h
fs/afs/write.c
fs/ceph/addr.c
fs/ceph/cache.h
fs/ceph/inode.c
fs/cifs/fscache.h
fs/netfs/buffered_read.c
include/linux/netfs.h