• Joel Stanley's avatar
    jffs2: Hook up splice_write callback · 42984af0
    Joel Stanley authored
    overlayfs using jffs2 as the upper filesystem would fail in some cases
    since moving to v5.10. The test case used was to run 'touch' on a file
    that exists in the lower fs, causing the modification time to be
    updated. It returns EINVAL when the bug is triggered.
    
    A bisection showed this was introduced in v5.9-rc1, with commit
    36e2c742 ("fs: don't allow splice read/write without explicit ops").
    Reverting that commit restores the expected behaviour.
    
    Some digging showed that this was due to jffs2 lacking an implementation
    of splice_write. (For unknown reasons the warn_unsupported that should
    trigger was not displaying any output).
    
    Adding this patch resolved the issue and the test now passes.
    
    Cc: stable@vger.kernel.org
    Fixes: 36e2c742 ("fs: don't allow splice read/write without explicit ops")
    Signed-off-by: default avatarJoel Stanley <joel@jms.id.au>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    Tested-by: default avatarLei YU <yulei.sh@bytedance.com>
    Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
    42984af0
file.c 9.13 KB