• Linus Torvalds's avatar
    netfs: Further cleanups after struct netfs_inode wrapper introduced · e81fb419
    Linus Torvalds authored
    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: default avatarDavid Howells <dhowells@redhat.com>
    cc: linux-cachefs@redhat.com
    Link: https://lore.kernel.org/r/CAHk-=wgkwKyNmNdKpQkqZ6DnmUL-x9hp0YBnUGjaPFEAdxDTbw@mail.gmail.com/
    e81fb419
vfs_inode.c 34.4 KB