<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/swap_ops.h, branch master</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=master</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-08-25T01:43:20+00:00</updated>
<entry>
<title>mm/swap: move swap_ops into file systems for file system-based swap</title>
<updated>2026-08-25T01:43:20+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2026-07-23T05:46:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=22779ae8175aad7c04827db44e934e53bf2bd2d4'/>
<id>urn:sha1:22779ae8175aad7c04827db44e934e53bf2bd2d4</id>
<content type='text'>
Currently swap to and from file systems goes through two indirect calls
between the swap ops and the swap_rw method.  Reduce this by directly
providing the swap_ops from the file system.

For this refactor swap_fs_submit into a swap_fs_prepare_rw helper that
initializes the iov_iter on the callers stack so that file systems can
call it directly, and use that to initialize file system specific ops in
the NFS and SMB clients, which then get passed to swap_fs_activate.

Link: https://lore.kernel.org/20260723054622.3460249-4-hch@lst.de
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Chris Li &lt;chrisl@kernel.org&gt;
Cc: Baoquan He &lt;baoquan.he@linux.dev&gt;
Cc: Kairui Song &lt;kasong@tencent.com&gt;
Cc: Kairui Song &lt;ryncsn@gmail.com&gt;
Cc: Kemeng Shi &lt;shikemeng@huaweicloud.com&gt;
Cc: Nhat Pham &lt;nphamcs@gmail.com&gt;
Cc: Steve French &lt;sfrench@samba.org&gt;
Cc: Usama Arif &lt;usama.arif@linux.dev&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm/swap: add a new swap_ops.h header to allow for pluggable swap ops</title>
<updated>2026-08-25T01:43:20+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2026-07-23T05:46:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=52d85ca90c7db41f8cfc72e5fe7dc62c2f983032'/>
<id>urn:sha1:52d85ca90c7db41f8cfc72e5fe7dc62c2f983032</id>
<content type='text'>
Add a new header to declare the swap_iocb, swap_ops and swap_ctx to allow
for swap_ops implementations outside of mm/page_io.c.  This will be used
to remove the double indirection for file system-based swap.  There is no
functional change, just a move of the declarations.

Note that there already is a swapops.h header, which is totally unrelated
to struct swap_ops.  The close naming is a bit unfortunate, but I could
not think of a better name for this header.

Link: https://lore.kernel.org/20260723054622.3460249-3-hch@lst.de
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Chris Li &lt;chrisl@kernel.org&gt;
Cc: Baoquan He &lt;baoquan.he@linux.dev&gt;
Cc: Kairui Song &lt;kasong@tencent.com&gt;
Cc: Kairui Song &lt;ryncsn@gmail.com&gt;
Cc: Kemeng Shi &lt;shikemeng@huaweicloud.com&gt;
Cc: Nhat Pham &lt;nphamcs@gmail.com&gt;
Cc: Steve French &lt;sfrench@samba.org&gt;
Cc: Usama Arif &lt;usama.arif@linux.dev&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
</feed>
