<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/overlayfs/file.c, branch linux-rolling-lts</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-lts</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-lts'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-10-10T12:02:47Z</updated>
<entry>
<title>ovl: remove redundant IOCB_DIO_CALLER_COMP clearing</title>
<updated>2025-10-10T12:02:47Z</updated>
<author>
<name>Seong-Gwang Heo</name>
</author>
<published>2025-10-09T05:41:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7933a585d70ee496fa341b50b8b0a95b131867ff'/>
<id>urn:sha1:7933a585d70ee496fa341b50b8b0a95b131867ff</id>
<content type='text'>
The backing_file_write_iter() function, which is called
immediately after this code, already contains identical
logic to clear the IOCB_DIO_CALLER_COMP flag along with
the same explanatory comment. There is no need to duplicate
this operation in the overlayfs code.

Signed-off-by: Seong-Gwang Heo &lt;heo@mykernel.net&gt;
Fixes: a6293b3e285c ("fs: factor out backing_file_{read,write}_iter() helpers")
Acked-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Reviewed-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>ovl_is_real_file: constify realpath argument</title>
<updated>2025-09-16T01:17:10Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2025-09-05T04:58:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5f587dd9b77a110456ff05442be7852c2ac2475d'/>
<id>urn:sha1:5f587dd9b77a110456ff05442be7852c2ac2475d</id>
<content type='text'>
Reviewed-by: Christian Brauner &lt;brauner@kernel.org&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>ovl: remove unneeded non-const conversion</title>
<updated>2025-07-18T09:09:33Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2025-06-07T11:53:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3ec2529eca6f175f4e3e87c4534010e044839b38'/>
<id>urn:sha1:3ec2529eca6f175f4e3e87c4534010e044839b38</id>
<content type='text'>
file_user_path() now takes a const file ptr.

Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
Link: https://lore.kernel.org/20250607115304.2521155-3-amir73il@gmail.com
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>ovl: Fix nested backing file paths</title>
<updated>2025-04-30T08:55:27Z</updated>
<author>
<name>André Almeida</name>
</author>
<published>2025-04-29T18:38:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=924577e4f6ca473de1528953a0e13505fae61d7b'/>
<id>urn:sha1:924577e4f6ca473de1528953a0e13505fae61d7b</id>
<content type='text'>
When the lowerdir of an overlayfs is a merged directory of another
overlayfs, ovl_open_realfile() will fail to open the real file and point
to a lower dentry copy, without the proper parent path. After this,
d_path() will then display the path incorrectly as if the file is placed
in the root directory.

This bug can be triggered with the following setup:

 mkdir -p ovl-A/lower ovl-A/upper ovl-A/merge ovl-A/work
 mkdir -p ovl-B/upper ovl-B/merge ovl-B/work

 cp /bin/cat ovl-A/lower/

 mount -t overlay overlay -o \
 lowerdir=ovl-A/lower,upperdir=ovl-A/upper,workdir=ovl-A/work \
 ovl-A/merge

 mount -t overlay overlay -o \
 lowerdir=ovl-A/merge,upperdir=ovl-B/upper,workdir=ovl-B/work \
 ovl-B/merge

 ovl-A/merge/cat /proc/self/maps | grep --color cat
 ovl-B/merge/cat /proc/self/maps | grep --color cat

The first cat will correctly show `/ovl-A/merge/cat`, while the second
one shows just `/cat`.

To fix that, uses file_user_path() inside of backing_file_open() to get
the correct file path for the dentry.

Co-developed-by: John Schoenick &lt;johns@valvesoftware.com&gt;
Signed-off-by: John Schoenick &lt;johns@valvesoftware.com&gt;
Signed-off-by: André Almeida &lt;andrealmeid@igalia.com&gt;
Fixes: def3ae83da02 ("fs: store real path instead of fake path in backing file f_path")
Cc: &lt;stable@vger.kernel.org&gt; # v6.7
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
</content>
</entry>
<entry>
<title>ovl: convert ovl_real_fdget() callers to ovl_real_file()</title>
<updated>2024-11-15T07:56:49Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2024-11-05T20:29:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d66907b51ba07450bf9c6fb94364e3bf3f5e4c04'/>
<id>urn:sha1:d66907b51ba07450bf9c6fb94364e3bf3f5e4c04</id>
<content type='text'>
Stop using struct fd to return a real file from ovl_real_fdget(),
because we no longer return a temporary file object and the callers
always get a borrowed file reference.

Rename the helper to ovl_real_file(), return a borrowed reference of
the real file that is referenced from the overlayfs file or an error.

Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
</content>
</entry>
<entry>
<title>ovl: convert ovl_real_fdget_path() callers to ovl_real_file_path()</title>
<updated>2024-11-15T07:56:48Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2024-11-05T20:28:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4333e42ed44448898a31665339702591284d1698'/>
<id>urn:sha1:4333e42ed44448898a31665339702591284d1698</id>
<content type='text'>
Stop using struct fd to return a real file from ovl_real_fdget_path(),
because we no longer return a temporary file object and the callers
always get a borrowed file reference.

Rename the helper to ovl_real_file_path(), return a borrowed reference
of the real file that is referenced from the overlayfs file or an error.

Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
</content>
</entry>
<entry>
<title>ovl: store upper real file in ovl_file struct</title>
<updated>2024-11-15T07:56:48Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2024-10-14T15:25:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=18e48d0e2c7b137be532fedbb5fba31b43e043b2'/>
<id>urn:sha1:18e48d0e2c7b137be532fedbb5fba31b43e043b2</id>
<content type='text'>
When an overlayfs file is opened as lower and then the file is copied up,
every operation on the overlayfs open file will open a temporary backing
file to the upper dentry and close it at the end of the operation.

Store the upper real file along side the original (lower) real file in
ovl_file instead of opening a temporary upper file on every operation.

Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
</content>
</entry>
<entry>
<title>ovl: allocate a container struct ovl_file for ovl private context</title>
<updated>2024-11-15T07:56:48Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2024-10-07T13:22:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=87a8a76c34a2ae6f667cc33249dc99705e363d1f'/>
<id>urn:sha1:87a8a76c34a2ae6f667cc33249dc99705e363d1f</id>
<content type='text'>
Instead of using -&gt;private_data to point at realfile directly, so
that we can add more context per ovl open file.

Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
</content>
</entry>
<entry>
<title>ovl: do not open non-data lower file for fsync</title>
<updated>2024-11-15T07:56:48Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2024-11-05T20:28:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c2c54b5f34f6341f24d06689d4b986bd75b4b41c'/>
<id>urn:sha1:c2c54b5f34f6341f24d06689d4b986bd75b4b41c</id>
<content type='text'>
ovl_fsync() with !datasync opens a backing file from the top most dentry
in the stack, checks if this dentry is non-upper and skips the fsync.

In case of an overlay dentry stack with lower data and lower metadata
above it, but without an upper metadata above it, the backing file is
opened from the top most lower metadata dentry and never used.

Refactor the helper ovl_real_fdget_meta() into ovl_real_fdget_path() and
open code the checks for non-upper inode in ovl_fsync(), so in that case
we can avoid the unneeded backing file open.

Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
</content>
</entry>
<entry>
<title>ovl: use wrapper ovl_revert_creds()</title>
<updated>2024-11-11T09:45:04Z</updated>
<author>
<name>Vinicius Costa Gomes</name>
</author>
<published>2024-11-05T19:35:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fc5a1d2287bf23f67da1fc7a178cf26c5e6ba9d0'/>
<id>urn:sha1:fc5a1d2287bf23f67da1fc7a178cf26c5e6ba9d0</id>
<content type='text'>
Introduce ovl_revert_creds() wrapper of revert_creds() to
match callers of ovl_override_creds().

Suggested-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
Signed-off-by: Vinicius Costa Gomes &lt;vinicius.gomes@intel.com&gt;
Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
</content>
</entry>
</feed>
