diff options
| author | NeilBrown <neil@brown.name> | 2026-07-17 19:27:51 +1000 |
|---|---|---|
| committer | Chuck Lever <cel@kernel.org> | 2026-08-26 16:40:12 -0400 |
| commit | 77f542cb3ca56ae8866fbeb607836815694c0fd4 (patch) | |
| tree | 957e56c7873d333644c059300400a8e62489739e /scripts/Makefile.thinlto | |
| parent | 4bd0e24e91f6a6c1b3a6a662d8fdc84dd1c826a6 (diff) | |
| download | linux-next-77f542cb3ca56ae8866fbeb607836815694c0fd4.tar.gz linux-next-77f542cb3ca56ae8866fbeb607836815694c0fd4.zip | |
nfsd: correctly handle CREATE of mounted-on files
Linux allows a file (non-directory) to be mounted on a file. nfsd
mostly supports this if the crossmnt option is in effect. However if
CREATE is used on an existing mounted-on file, the filehandle for the
underlying file is returns. The client will then continue to use that
filehandle.
So
cat /mnt/file
will show the contents of the mounted file as expected, but if
the dcache is flushed with "drop_caches" or similar, then
>> /mnt/file
cat /mnt/file
will show the mounted-on file.
For exclusive or checked creates this is not a problem as the creation
will fail no matter which file is seen. For unchecked creates we need to
see if the name is in the dcache, and if it is mounted. If so, we
simply provide that filehandle, possibly truncating.
This probably has always existed since before the git history.
Signed-off-by: NeilBrown <neil@brown.name>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Link: https://patch.msgid.link/20260717093001.1972119-4-neilb@ownmail.net
Signed-off-by: Chuck Lever <cel@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
